Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ words:
- chalin
- docset
- Docsy
- errorf
- gohugoio
- Goldydocs
- pageinfo
1 change: 1 addition & 0 deletions content/en/blog/_index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Blog
aliases: [/blog/2018/*]
menu: { main: { weight: 30 } }
---

Expand Down
7 changes: 4 additions & 3 deletions content/fa/blog/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
title: بلاگ داکسی
linkTitle: بلاگ
menu: {main: {weight: 30}}
# cSpell:disable
title: بلاگ
aliases: [ /blog/2018/* ]
menu: { main: { weight: 30 } }
---

اینجا قسمت **بلاگ** است و دو دسته بندی دارد: اخبار و نسخه های منتشر شده.
Expand Down
1 change: 1 addition & 0 deletions content/fa/blog/news/_index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# cSpell:disable
title: اخبار
---
4 changes: 2 additions & 2 deletions content/fa/blog/news/first-post/index.md
Original file line number Diff line number Diff line change
@@ -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: "پوسته داکسی، قدرت گرفته از هوگو باعث می‌شود که سازندگان پروژه تمرکز خود را روی ساخت مطالب قرار دهند و نیازی به ساخت وبسایت نداشته باشد."
---

**این یک نوشته معمولی شامل تصویر می باشد.**
Expand Down
16 changes: 14 additions & 2 deletions hugo.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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/
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use :slug as it falls back to the title, which makes harder to keep uniform URLs across locales.

blog: /:section/:year/:month/:day/:slugorcontentbasename

# Image processing configuration.
imaging:
Expand Down Expand Up @@ -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:
Expand Down
17 changes: 17 additions & 0 deletions layouts/home.redirects
Original file line number Diff line number Diff line change
@@ -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 -}}