diff --git a/demo/hugo.toml b/demo/hugo.toml index 001730dbe..03e4d21dd 100644 --- a/demo/hugo.toml +++ b/demo/hugo.toml @@ -35,4 +35,3 @@ baseURL = "http://example.org/" # FixIt theme version version = "0.3.X" # e.g. "0.2.X", "0.2.15", "v0.2.15" etc. # ... - diff --git a/hugo.toml b/hugo.toml index 390bb6a00..4edca3383 100644 --- a/hugo.toml +++ b/hugo.toml @@ -231,8 +231,6 @@ enableEmoji = true # ------------------------------------------------------------------------------------- [mediaTypes] - # FixIt 0.3.10 | NEW Options to make output feed.json files - # Warning: The application/feed+json media type will cause an unknown error in resources.GetRemote! # [mediaTypes."application/feed+json"] # suffixes = ["json"] @@ -274,13 +272,6 @@ enableEmoji = true isPlainText = true isHTML = false notAlternative = true - # FixIt 0.3.10 | NEW Options to make output feed.json file - [outputFormats.feed] - baseName = "feed" - # Warning: The application/feed+json media type will cause an unknown error in resources.GetRemote! - mediaType = "application/json" - isPlainText = true - isHTML = false # FixIt 0.3.10 | NEW Options to make output search.json file [outputFormats.search] baseName = "search" @@ -296,17 +287,17 @@ enableEmoji = true # ------------------------------------------------------------------------------------- # Options to make hugo output files, the optional values are below: -# home = ["html", "rss", "feed", "archives", "offline", "readme", "baidu_urls", "search"] +# home = ["html", "rss", "archives", "offline", "readme", "baidu_urls", "search"] # page = ["html", "markdown"] -# section = ["html", "rss", "feed"] +# section = ["html", "rss"] # taxonomy = ["html"] -# term = ["html", "rss", "feed"] +# term = ["html", "rss"] [outputs] - home = ["html", "rss", "feed", "archives", "offline", "readme", "baidu_urls", "search"] + home = ["html", "rss", "archives", "offline", "readme", "baidu_urls", "search"] page = ["html", "markdown"] - section = ["html", "rss", "feed"] + section = ["html", "rss"] taxonomy = ["html"] - term = ["html", "rss", "feed"] + term = ["html", "rss"] # ------------------------------------------------------------------------------------- # Taxonomies Configuration diff --git a/layouts/_default/home.feed.json b/layouts/_default/home.feed.json deleted file mode 100644 index 7b3a1a4b5..000000000 --- a/layouts/_default/home.feed.json +++ /dev/null @@ -1,3 +0,0 @@ -{{- $options := dict "Site" .Site "Config" .Site.Params.feed "OutputFormats" .OutputFormats -}} -{{- $options = dict "Title" .Site.Title "Pages" (.Scratch.Get "mainSectionPages") | merge $options -}} -{{- partial "feed/json.html" $options -}} diff --git a/layouts/partials/feed/json.html b/layouts/partials/feed/json.html deleted file mode 100644 index be3002fd5..000000000 --- a/layouts/partials/feed/json.html +++ /dev/null @@ -1,83 +0,0 @@ -{{- $pages := .Pages -}} -{{- /* Front matter: password */ -}} -{{- $pages = where $pages "Params.password" "eq" nil -}} -{{- /* Front matter: hiddenFromFeed */ -}} -{{- $pages = where $pages "Params.hiddenFromFeed" "ne" true -}} -{{- if ge .Config.limit 1 -}} - {{- $pages = $pages | first .Config.limit -}} -{{- end -}} -{{- $length := $pages.Len -}} - -{ - "version": "https://jsonfeed.org/version/1.1", - "title": "{{ .Title }}", - "description": "{{ .Site.Params.description | default .Site.Title }}", - "home_page_url": "{{ .Site.BaseURL }}", - {{ with .OutputFormats.Get "feed" -}} - "feed_url": "{{ .Permalink }}", - {{ end -}} - {{ with .Site.Language.LanguageCode -}} - "language": "{{ . }}", - {{ end -}} - "icon": "{{ `/apple-touch-icon.png` | absURL }}", - "favicon": "{{ `/favicon.ico` | absURL }}", - {{ with .Site.Params.author.name -}} - "authors": [ - { - "name": "{{ . }}"{{ with $.Site.Params.author.link }}, - "url": "{{ . }}"{{ end }}{{ with $.Site.Params.author.avatar }}, - "avatar": "{{ . | absURL }}"{{ end }} - } - ], - {{ end -}} - "items": [ - {{- range $index, $page := $pages }} - {{- $params := .Params | merge .Site.Params.Page }} - {{- $fullText := ((.Params.feed | default dict) | merge $.Config ).fullText }} - {{- $author := partial "function/get-author-map.html" .Params.author }} - {{- $image := $params.featuredimagepreview | default $params.featuredimage }} - {{- with $image }} - {{- if not (hasPrefix . "/") }} - {{- $image = (printf "%s%s" $page.RelPermalink .) | safeURL }} - {{- end }} - {{- $image = $image | absURL }} - {{- end }} - {{- with .Resources.GetMatch "featured-image" }} - {{- $image = .Permalink }} - {{- end }} - {{- with .Resources.GetMatch "featured-image-preview" }} - {{- $image = .Permalink }} - {{- end }} - { - "title": {{ .Title | jsonify }}, - "date_published": "{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}", - "date_modified": "{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}", - "id": "{{ .Permalink }}", - "url": "{{ .Permalink }}", - {{ with $author.name -}} - "authors": [ - { - "name": "{{ . }}"{{ with $author.link }}, - "url": "{{ . }}"{{ end }}{{ with $author.avatar }}, - "avatar": "{{ . | absURL }}"{{ end }} - } - ], - {{ end -}} - {{ with .Params.tags -}} - "tags": {{ . | jsonify }}, - {{ end -}} - {{ with $image -}} - "image": "{{ . }}", - {{ end -}} - {{ with .Summary -}} - "summary": {{ . | plainify | jsonify }}, - {{ end -}} - {{- if $fullText -}} - "content_html": {{ .Content | jsonify }} - {{- else -}} - "content_html": {{ (.Summary | default .Description | default .Title) | jsonify }} - {{- end }} - }{{ if ne (add $index 1) $pages.Len }},{{ end -}} - {{- end }} - ] -} diff --git a/layouts/partials/init/index.html b/layouts/partials/init/index.html index f1ce8d6b2..21c578357 100644 --- a/layouts/partials/init/index.html +++ b/layouts/partials/init/index.html @@ -1,4 +1,4 @@ -{{- .Scratch.Set "version" "v0.3.10-e4035606" -}} +{{- .Scratch.Set "version" "v0.3.10-d913b1fa" -}} {{- .Scratch.Set "this" dict -}} {{- partial "init/detection-env.html" . -}} diff --git a/layouts/section/section.feed.json b/layouts/section/section.feed.json deleted file mode 100644 index 116d6ac7f..000000000 --- a/layouts/section/section.feed.json +++ /dev/null @@ -1,8 +0,0 @@ -{{- $title := title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) -}} -{{- if .Site.Params.withSiteTitle -}} - {{- $title = printf "%s %s %s" $title .Site.Params.titleDelimiter .Site.Title -}} -{{- end -}} -{{- $config := (.Params.feed | default dict) | merge .Site.Params.section.feed | merge .Site.Params.feed -}} -{{- $options := dict "Site" .Site "Config" $config "OutputFormats" .OutputFormats -}} -{{- $options = dict "Title" $title "Pages" .Pages | merge $options -}} -{{- partial "feed/json.html" $options -}} diff --git a/layouts/taxonomy/list.feed.json b/layouts/taxonomy/list.feed.json deleted file mode 100644 index 3eed2e6c1..000000000 --- a/layouts/taxonomy/list.feed.json +++ /dev/null @@ -1,8 +0,0 @@ -{{- $title := printf "%s %s" .Title (T .Data.Singular | default .Data.Singular) -}} -{{- if .Site.Params.withSiteTitle -}} - {{- $title = printf "%s %s %s" $title .Site.Params.titleDelimiter .Site.Title -}} -{{- end -}} -{{- $config := (.Params.feed | default dict) | merge .Site.Params.list.feed | merge .Site.Params.feed -}} -{{- $options := dict "Site" .Site "Config" $config "OutputFormats" .OutputFormats -}} -{{- $options = dict "Title" $title "Pages" .Pages | merge $options -}} -{{- partial "feed/json.html" $options -}}