diff --git a/.cspell.yml b/.cspell.yml index c60eb2b1ec1..d95d3ffa2a0 100644 --- a/.cspell.yml +++ b/.cspell.yml @@ -4,6 +4,7 @@ words: - chalin - docset - Docsy + - errorf - gohugoio - Goldydocs - pageinfo diff --git a/content/en/blog/_index.md b/content/en/blog/_index.md index 020aa9866b5..1cb1226f58b 100644 --- a/content/en/blog/_index.md +++ b/content/en/blog/_index.md @@ -1,5 +1,6 @@ --- title: Blog +aliases: [/blog/2018/*] menu: { main: { weight: 30 } } --- diff --git a/content/fa/blog/_index.md b/content/fa/blog/_index.md index 3219ad6ae67..8051a9f06bf 100644 --- a/content/fa/blog/_index.md +++ b/content/fa/blog/_index.md @@ -1,7 +1,8 @@ --- -title: بلاگ داکسی -linkTitle: بلاگ -menu: {main: {weight: 30}} +# cSpell:disable +title: بلاگ +aliases: [ /blog/2018/* ] +menu: { main: { weight: 30 } } --- اینجا قسمت **بلاگ** است و دو دسته بندی دارد: اخبار و نسخه های منتشر شده. diff --git a/content/fa/blog/news/_index.md b/content/fa/blog/news/_index.md index 91b0a20d68a..d7afe4a1dcc 100644 --- a/content/fa/blog/news/_index.md +++ b/content/fa/blog/news/_index.md @@ -1,3 +1,4 @@ --- +# cSpell:disable title: اخبار --- diff --git a/content/fa/blog/news/first-post/index.md b/content/fa/blog/news/first-post/index.md index acc420f9a54..13822a905ab 100644 --- a/content/fa/blog/news/first-post/index.md +++ b/content/fa/blog/news/first-post/index.md @@ -1,10 +1,10 @@ --- -date: 2018-10-06 +date: 2026-02-10 # cSpell:disable title: مستدات راحت با داکسی linkTitle: معرفی داکسی -description: "پوسته داکسی، قدرت گرفته از هوگو باعث می‌شود که سازندگان پروژه تمرکز خود را روی ساخت مطالب قرار دهند و نیازی به ساخت وبسایت نداشته باشد." author: '[Patrice Chalin](https://github.com/chalin)' +description: "پوسته داکسی، قدرت گرفته از هوگو باعث می‌شود که سازندگان پروژه تمرکز خود را روی ساخت مطالب قرار دهند و نیازی به ساخت وبسایت نداشته باشد." --- **این یک نوشته معمولی شامل تصویر می باشد.** diff --git a/hugo.yaml b/hugo.yaml index 31e247b9844..1003a98a19e 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -1,7 +1,7 @@ baseURL: https://example.docsy.dev title: Goldydocs -# cSpell:ignore goldmark github hugo readingtime docsy subdir lastmod pygments linenos catmullrom norsk gu +# cSpell:ignore goldmark github hugo readingtime docsy subdir lastmod pygments linenos catmullrom norsk gu slugorcontentbasename # Language settings contentDir: content/en @@ -32,9 +32,20 @@ pygmentsUseClassic: false # See https://help.farbox.com/pygments.html pygmentsStyle: tango +mediaTypes: + text/redirects: + delimiter: '' + +outputFormats: + redirects: + baseName: _redirects + isPlainText: true + mediaType: text/redirects + root: true + # Configure how URLs look like per section. permalinks: - blog: /:section/:year/:month/:day/:slug/ + blog: /:section/:year/:month/:day/:slugorcontentbasename # Image processing configuration. imaging: @@ -87,6 +98,7 @@ markup: # Comment out if you don't want the "print entire section" link enabled. outputs: + home: [HTML, print, RSS, redirects] section: [HTML, print, RSS] params: diff --git a/layouts/home.redirects b/layouts/home.redirects new file mode 100644 index 00000000000..336493edf5c --- /dev/null +++ b/layouts/home.redirects @@ -0,0 +1,17 @@ +{{/* + +Adapted from https://gohugo.io/methods/page/aliases/#template-implementation + +cSpell:ignore hugo +*/ -}} + +{{ range .Sites -}} + {{ range $p := .Pages -}} + {{ range .Aliases -}} + {{ if findRE `\s` . -}} + {{ errorf "One of the front matter aliases in %q contains whitespace" $p.String -}} + {{ end -}} + {{ printf "%s %s 301\n" . $p.RelPermalink -}} + {{ end -}} + {{ end -}} +{{ end -}}