Merge pull request #6 from softinio/update-hugo-and-new-comments

Upgrade hugo, add new comments and jsonfeed
This commit is contained in:
Salar Rahmanian 2020-01-26 10:00:15 -08:00 committed by GitHub
commit 8fd8191115
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 46 additions and 3 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
/public /public
.DS_Store .DS_Store
/resources/_gen/

View file

@ -12,10 +12,16 @@ defaultContentLanguage = "en"
hasCJKLanguage = false hasCJKLanguage = false
paginate = 5 paginate = 5
rssLimit = 20 rssLimit = 20
disqusShortname = "gadgetplayboy"
googleAnalytics = "UA-47014432-1" googleAnalytics = "UA-47014432-1"
copyright = "" 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] [author]
name = "Salar Rahmanian" name = "Salar Rahmanian"
@ -64,7 +70,7 @@ copyright = ""
# site info (optional) # 站点信息(可选,不需要的可以直接注释掉) # site info (optional) # 站点信息(可选,不需要的可以直接注释掉)
logoTitle = "Salar Rahmanian" logoTitle = "Salar Rahmanian"
description = "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 # 归档、标签、分类每页显示的文章数目,建议修改为一个较大的值 # paginate of archives, tags and categories # 归档、标签、分类每页显示的文章数目,建议修改为一个较大的值
archive-paginate = 3 archive-paginate = 3
@ -104,6 +110,11 @@ copyright = ""
gitmentJS = '<script src="https://cdn.jsdelivr.net/npm/gitment@0.0.3/dist/gitment.browser.min.js" crossorigin="anonymous"></script>' gitmentJS = '<script src="https://cdn.jsdelivr.net/npm/gitment@0.0.3/dist/gitment.browser.min.js" crossorigin="anonymous"></script>'
gitmentCSS = '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitment@0.0.3/style/default.min.css" crossorigin="anonymous">' gitmentCSS = '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gitment@0.0.3/style/default.min.css" crossorigin="anonymous">'
[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 [params.gitment] # Gitment is a comment system based on GitHub issues. see https://github.com/imsun/gitment
owner = "" # Your GitHub ID owner = "" # Your GitHub ID
repo = "" # The repo to store comments repo = "" # The repo to store comments
@ -125,3 +136,13 @@ copyright = ""
n-gitlab = "https://gitlab.com/softinio" n-gitlab = "https://gitlab.com/softinio"
# o-goodreads = "http://en.xianmin.org/hugo-theme-jane/" # 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

View file

@ -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 }}
]
}

@ -1 +1 @@
Subproject commit 335d0c2f69149f63a0a7db0252a0628ac5a0c4a1 Subproject commit 1b73e49894e080e444fea1ccf3d5ba659db5cfb4