diff --git a/README.md b/README.md index 026f39e..c89b317 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -[![Go Report Card](https://goreportcard.com/badge/github.com/n0x1m/hugoext)](https://goreportcard.com/report/github.com/n0x1m/hugoext) -[![GoDoc](https://godoc.org/github.com/n0x1m/hugoext?status.svg)](https://godoc.org/github.com/n0x1m/hugoext) +[![Go Report Card](https://goreportcard.com/badge/gitrepo.ru/neonxp/hugoext)](https://goreportcard.com/report/gitrepo.ru/neonxp/hugoext) +[![GoDoc](https://godoc.org/gitrepo.ru/neonxp/hugoext?status.svg)](https://godoc.org/gitrepo.ru/neonxp/hugoext) # hugoext @@ -37,7 +37,7 @@ unmodified. ## Example Use -Using the [md2gmi](https://github.com/n0x1m/md2gmi) command line utility to convert markdown to +Using the [md2gmi](https://gitrepo.ru/neonxp/md2gmi) command line utility to convert markdown to gemtext. Executed from the hugo directory: ``` @@ -57,21 +57,21 @@ page = ":filename" ### Installation ``` -go install github.com/n0x1m/hugoext@latest +go install gitrepo.ru/neonxp/hugoext@latest ``` To use the gemini file server and markdown to gemtext converter in the examples below, also install these: ``` -go install github.com/n0x1m/md2gmi@latest -go install github.com/n0x1m/gmifs@latest +go install gitrepo.ru/neonxp/md2gmi@latest +go install gitrepo.ru/neonxp/gmifs@latest ``` ### Development To test the extension in a similar fashion to the hugo workflow, use a server to host the static -files. Here an example for a Gemlog using [gmifs](https://github.com/n0x1m/gmifs) in a makefile: +files. Here an example for a Gemlog using [gmifs](https://gitrepo.ru/neonxp/gmifs) in a makefile: ```makefile serve: diff --git a/file_tree.go b/file_tree.go index 3b191f6..1dcc062 100644 --- a/file_tree.go +++ b/file_tree.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - "github.com/n0x1m/hugoext/hugo" + "gitrepo.ru/neonxp/hugoext/hugo" ) type FileTree struct { diff --git a/go.mod b/go.mod index 12a7dc7..2f71ec9 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/n0x1m/hugoext +module gitrepo.ru/neonxp/hugoext go 1.16 diff --git a/hugo/permalinks.go b/hugo/permalinks.go index 27afcc5..f8430ef 100644 --- a/hugo/permalinks.go +++ b/hugo/permalinks.go @@ -167,7 +167,7 @@ func pageToPermalinkSlugElseTitle(m *PageMetadata, a string) (string, error) { // pageToPermalinkFilename returns the URL-safe form of the filename func pageToPermalinkFilename(m *PageMetadata, _ string) (string, error) { - return URLEscape(m.Filepath) + return strings.ToLower(strings.ReplaceAll(m.Filepath, " ", "-")), nil } func pageToPermalinkTitle(m *PageMetadata, _ string) (string, error) { diff --git a/main.go b/main.go index f566000..e267e6f 100644 --- a/main.go +++ b/main.go @@ -8,7 +8,7 @@ import ( "os" "path/filepath" - "github.com/n0x1m/hugoext/hugo" + "gitrepo.ru/neonxp/hugoext/hugo" ) const ( diff --git a/page_metadata.go b/page_metadata.go index 7f0c142..4dfb9f3 100644 --- a/page_metadata.go +++ b/page_metadata.go @@ -3,7 +3,7 @@ package main import ( "time" - "github.com/n0x1m/hugoext/hugo" + "gitrepo.ru/neonxp/hugoext/hugo" ) func NewContentFromMeta(meta map[string]interface{}) *hugo.PageMetadata {