diff --git a/.gitignore b/.gitignore index 82ef3a9..b2e3b3a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /public .DS_Store +/resources/_gen/ diff --git a/config.toml b/config.toml index 1e8c1d1..f76042e 100644 --- a/config.toml +++ b/config.toml @@ -12,10 +12,16 @@ defaultContentLanguage = "en" hasCJKLanguage = false paginate = 5 rssLimit = 20 -disqusShortname = "gadgetplayboy" googleAnalytics = "UA-47014432-1" copyright = "" +# Highlight options. +# See https://gohugo.io/content-management/syntax-highlighting/ +PygmentsCodeFences = true # Enable syntax highlighting with GitHub flavoured code fences +PygmentsUseClasses = true # Use CSS classes to format highlighted code +PygmentsCodefencesGuessSyntax = true +PygmentsOptions = "linenos=table" + [author] name = "Salar Rahmanian" @@ -64,7 +70,7 @@ copyright = "" # site info (optional) # 站点信息(可选,不需要的可以直接注释掉) logoTitle = "Salar Rahmanian" description = "Salar Rahmanian" - keywords = ["Salar, Rahmanian, Blog, python, golang, go, scala"] + keywords = ["Salar, Rahmanian, Blog, python, scala, haskell, swiftlang, nix, NixOS"] # paginate of archives, tags and categories # 归档、标签、分类每页显示的文章数目,建议修改为一个较大的值 archive-paginate = 3 @@ -104,6 +110,11 @@ copyright = "" gitmentJS = '' gitmentCSS = '' + [params.utteranc] # utteranc is a comment system based on GitHub issues. see https://utteranc.es + enable = true + repo = "softinio/softinio.com" # The repo to store comments + issueTerm = "url" + [params.gitment] # Gitment is a comment system based on GitHub issues. see https://github.com/imsun/gitment owner = "" # Your GitHub ID repo = "" # The repo to store comments @@ -125,3 +136,13 @@ copyright = "" n-gitlab = "https://gitlab.com/softinio" # o-goodreads = "http://en.xianmin.org/hugo-theme-jane/" +[outputs] + home = ["html", "jsonfeed","rss"] + page = ["html"] + +[outputFormats] + [outputFormats.jsonfeed] + mediaType = "application/json" + baseName = "feed" + isPlainText = true + diff --git a/layouts/index.jsonfeed.json b/layouts/index.jsonfeed.json new file mode 100644 index 0000000..1e0d890 --- /dev/null +++ b/layouts/index.jsonfeed.json @@ -0,0 +1,21 @@ +{ + "version": "https://jsonfeed.org/version/1", + "title": "{{ .Site.Title }}", + "home_page_url": {{ .Permalink | jsonify }}, + "feed_url": {{ with .OutputFormats.Get "jsonfeed" -}} + {{- .Permalink | jsonify -}} + {{- end }}, + "items": [ + {{ range $index, $entry := first 10 .Data.Pages }} + {{- if $index }}, {{ end }} + { + "id": {{ .Permalink | jsonify }}, + "url": {{ .Permalink | jsonify }}, + "title": {{ .Title | jsonify }}, + "date_published": {{ .Date.Format "2006-01-02T15:04:05Z07:00" | jsonify }}, + "content_html": {{ .Content | jsonify }} + } + {{- end }} + ] +} + diff --git a/themes/jane b/themes/jane index 335d0c2..1b73e49 160000 --- a/themes/jane +++ b/themes/jane @@ -1 +1 @@ -Subproject commit 335d0c2f69149f63a0a7db0252a0628ac5a0c4a1 +Subproject commit 1b73e49894e080e444fea1ccf3d5ba659db5cfb4