Skip to content

Commit

Permalink
✨ Feat: add options to make output readme.md and change options for b…
Browse files Browse the repository at this point in the history
…aidu_urls.txt
  • Loading branch information
Lruihao committed Jan 1, 2024
1 parent 804d1e4 commit 34021a5
Show file tree
Hide file tree
Showing 17 changed files with 85 additions and 10 deletions.
30 changes: 21 additions & 9 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -219,36 +219,48 @@ enableEmoji = true
mediaType = "text/markdown"
isPlainText = true
isHTML = false
# FixIt 0.2.15 | NEW Options to make output baidu_urls.txt file
[outputFormats.BaiduUrls]
baseName = "baidu_urls"
mediaType = "text/plain"
isPlainText = true
isHTML = false
# FixIt 0.3.0 | NEW Options to make output /archives/index.html file
[archives]
[outputFormats.archives]
path = "archives"
baseName = "index"
mediaType = "text/html"
isPlainText = false
isHTML = true
permalinkable = true
# FixIt 0.3.0 | NEW Options to make output /offline/index.html file
[offline]
[outputFormats.offline]
path = "offline"
baseName = "index"
mediaType = "text/html"
isPlainText = false
isHTML = true
permalinkable = true
# FixIt 0.3.0 | NEW Options to make output readme.md file
[outputFormats.README]
baseName = "readme"
mediaType = "text/markdown"
isPlainText = true
isHTML = false
# FixIt 0.3.0 | CHANGED Options to make output baidu_urls.txt file
[outputFormats.baidu_urls]
baseName = "baidu_urls"
mediaType = "text/plain"
isPlainText = true
isHTML = false

# -------------------------------------------------------------------------------------
# Customizing Output Formats
# See: https://gohugo.io/templates/output-formats/#customizing-output-formats
# -------------------------------------------------------------------------------------

# Options to make hugo output files, the optional values are below:
# home: ["HTML", "RSS", "JSON", "archives", "offline", "README", "baidu_urls"]
# page: ["HTML", "MarkDown"]
# section: ["HTML", "RSS"]
# taxonomy: ["HTML", "RSS"]
# term: ["HTML", "RSS"]
[outputs]
home = ["HTML", "RSS", "JSON", "BaiduUrls", "archives", "offline"]
home = ["HTML", "RSS", "JSON", "archives", "offline"]
page = ["HTML", "MarkDown"]
section = ["HTML", "RSS"]
taxonomy = ["HTML"]
Expand Down
4 changes: 4 additions & 0 deletions i18n/de.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ recentlyUpdated = "Zuletzt aktualisiert"
[section.totalWordCount]
one = ""
other = ""

[section.archiveCounter]
one = ""
other = ""
# === Section ===

# === Pagination ===
Expand Down
4 changes: 4 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ recentlyUpdated = "Recently Updated"
[section.totalWordCount]
one = "Total one word"
other = "Total {{ .Count }} words"

[section.archiveCounter]
one = "Only one article"
other = "{{ .Count }} articles in total"
# === Section ===

# === Pagination ===
Expand Down
4 changes: 4 additions & 0 deletions i18n/es.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ recentlyUpdated = "Actualizado recientemente"
[section.totalWordCount]
one = ""
other = ""

[section.archiveCounter]
one = ""
other = ""
# === Section ===

# === Pagination ===
Expand Down
4 changes: 4 additions & 0 deletions i18n/fr.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ recentlyUpdated = "Récemment Modifié"
[section.totalWordCount]
one = "Nombre de mots: 1"
other = "Nombre de mots: {{ .Count }}"

[section.archiveCounter]
one = ""
other = ""
# === Section ===

# === Pagination ===
Expand Down
4 changes: 4 additions & 0 deletions i18n/it.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ recentlyUpdated = "Aggiornati di recente"
[section.totalWordCount]
one = ""
other = ""

[section.archiveCounter]
one = ""
other = ""
# === Section ===

# === Pagination ===
Expand Down
4 changes: 4 additions & 0 deletions i18n/pl.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ recentlyUpdated = "Ostatnio zaktualizowane"
[section.totalWordCount]
one = ""
other = ""

[section.archiveCounter]
one = ""
other = ""
# === Section ===

# === Pagination ===
Expand Down
4 changes: 4 additions & 0 deletions i18n/pt-BR.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ recentlyUpdated = "Recentemente atualizado"
[section.totalWordCount]
one = ""
other = ""

[section.archiveCounter]
one = ""
other = ""
# === Section ===

# === Pagination ===
Expand Down
4 changes: 4 additions & 0 deletions i18n/ro.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ recentlyUpdated = "Actualizat recent"
[section.totalWordCount]
one = ""
other = ""

[section.archiveCounter]
one = ""
other = ""
# === Section ===

# === Pagination ===
Expand Down
4 changes: 4 additions & 0 deletions i18n/ru.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ recentlyUpdated = "Недавно обновленные"
[section.totalWordCount]
one = ""
other = ""

[section.archiveCounter]
one = ""
other = ""
# === Section ===

# === Pagination ===
Expand Down
4 changes: 4 additions & 0 deletions i18n/sr.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ recentlyUpdated = "Недавно Ажурирано"
[section.totalWordCount]
one = ""
other = ""

[section.archiveCounter]
one = ""
other = ""
# === Section ===

# === Pagination ===
Expand Down
4 changes: 4 additions & 0 deletions i18n/vi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ recentlyUpdated = "Mới nhất"
[section.totalWordCount]
one = ""
other = ""

[section.archiveCounter]
one = ""
other = ""
# === Section ===

# === Pagination ===
Expand Down
3 changes: 3 additions & 0 deletions i18n/zh-CN.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ recentlyUpdated = "最近更新"

[section.totalWordCount]
other = "总计约 {{ .Count }} 字"

[section.archiveCounter]
other = "共计 {{ .Count }} 篇文章"
# === Section ===

# === Pagination ===
Expand Down
3 changes: 3 additions & 0 deletions i18n/zh-TW.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ recentlyUpdated = "最近更新"

[section.totalWordCount]
other = "總計約 {{ .Count }} 字"

[section.archiveCounter]
other = "共計 {{ .Count }} 篇文章"
# === Section ===

# === Pagination ===
Expand Down
File renamed without changes.
13 changes: 13 additions & 0 deletions layouts/index.readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# {{ .Site.Title }}

{{ $pages := where .Site.RegularPages "Type" "posts" -}}
{{- $pages = where $pages "Draft" "eq" false -}}
{{- T "section.archiveCounter" (len $pages) }}
{{ range $pages.GroupByPublishDate "2006" }}
{{- if ne .Key "0001" -}}
{{- printf "\n## %v\n\n" .Key -}}
{{- range .Pages -}}
{{- printf "- %v [%v](%v \"%v\")\n" (.PublishDate.Format "01-02") .Title .Permalink (.PublishDate.Format "2006-01-02 15:04:05") -}}
{{- end -}}
{{- end -}}
{{- end -}}

1 comment on commit 34021a5

@vercel
Copy link

@vercel vercel bot commented on 34021a5 Jan 1, 2024

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

fixit – ./

fixit-cell-x.vercel.app
fixit-git-master-cell-x.vercel.app
fixit.lruihao.cn
hugofixit.vercel.app

Please sign in to comment.