mirror of
https://github.com/thomasjsn/hugo-theme-hello-friend.git
synced 2024-11-24 16:55:07 +01:00
add rss image
This commit is contained in:
parent
b4504b35b2
commit
f35a6c88a1
38
README.md
38
README.md
@ -10,24 +10,22 @@ This theme is pretty basic and covers all of the essentials. All you have to do
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
- [Hello Friend](#hello-friend)
|
- [Features](#features)
|
||||||
- [DEMO - https://hugo-hello-friend.now.sh/](#demo---httpshugo-hello-friendnowsh)
|
- [Built-in shortcodes](#built-in-shortcodes)
|
||||||
- [Features](#features)
|
- [Code highlighting](#code-highlighting)
|
||||||
- [Built-in shortcodes](#built-in-shortcodes)
|
- [Improved RSS Feed](#improved-rss-feed)
|
||||||
- [Code highlighting](#code-highlighting)
|
- [How to start](#how-to-start)
|
||||||
- [Improved RSS Feed](#improved-rss-feed)
|
- [How to configure](#how-to-configure)
|
||||||
- [How to start](#how-to-start)
|
- [How to add a cover image to your posts](#how-to-add-a-cover-image-to-your-posts)
|
||||||
- [How to configure](#how-to-configure)
|
- [How to display the Last Modified Date in your posts](#how-to-display-the-last-modified-date-in-your-posts)
|
||||||
- [How to add a cover image to your posts](#how-to-add-a-cover-image-to-your-posts)
|
- [How to hide "Read more" button](#how-to-hide-read-more-button)
|
||||||
- [How to display the Last Modified Date in your posts](#how-to-display-the-last-modified-date-in-your-posts)
|
- [Add-ons](#add-ons)
|
||||||
- [How to hide "Read more" button](#how-to-hide-%22read-more%22-button)
|
- [How to run your site](#how-to-run-your-site)
|
||||||
- [Add-ons](#add-ons)
|
- [How to edit the theme](#how-to-edit-the-theme)
|
||||||
- [How to run your site](#how-to-run-your-site)
|
- [How to contribute](#how-to-contribute)
|
||||||
- [How to edit the theme](#how-to-edit-the-theme)
|
- [`Hello Friend` theme user?](#hello-friend-theme-user)
|
||||||
- [How to contribute](#how-to-contribute)
|
- [Sponsoring](#sponsoring)
|
||||||
- [`Hello Friend` theme user?](#hello-friend-theme-user)
|
- [License](#license)
|
||||||
- [Sponsoring](#sponsoring)
|
|
||||||
- [License](#license)
|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
@ -58,12 +56,14 @@ By default the theme is using PrismJS to color your code syntax. All you need to
|
|||||||
|
|
||||||
#### Improved RSS Feed
|
#### Improved RSS Feed
|
||||||
|
|
||||||
Some small enhancements have been made to Hugo's [internal RSS](https://github.com/gohugoio/hugo/blob/25a6b33693992e8c6d9c35bc1e781ce3e2bca4be/tpl/tplimpl/embedded/templates/_default/rss.xml) generation code.
|
Some enhancements have been made to Hugo's [internal RSS](https://github.com/gohugoio/hugo/blob/25a6b33693992e8c6d9c35bc1e781ce3e2bca4be/tpl/tplimpl/embedded/templates/_default/rss.xml) generation code.
|
||||||
|
|
||||||
**A page's cover image now appears at the top of its feed display**. This image is set manually using [the cover params](#how-to-add-a-cover-image-to-your-posts). If unset, the RSS generator searches for the first image file in the page bundle whose name includes 'featured', 'cover', or 'thumbnail'.
|
**A page's cover image now appears at the top of its feed display**. This image is set manually using [the cover params](#how-to-add-a-cover-image-to-your-posts). If unset, the RSS generator searches for the first image file in the page bundle whose name includes 'featured', 'cover', or 'thumbnail'.
|
||||||
|
|
||||||
**You can optionally display the full page content in your RSS feed** (default is Description or Summary data from Front Matter). Set `rssFullText = true` in your `config.toml` file to enable this option.
|
**You can optionally display the full page content in your RSS feed** (default is Description or Summary data from Front Matter). Set `rssFullText = true` in your `config.toml` file to enable this option.
|
||||||
|
|
||||||
|
**You can choose a site image to be displayed when searching for your RSS feed.** Set `rssImage = "image/url/here"` in your `config.toml` file to enable this option.
|
||||||
|
|
||||||
## How to start
|
## How to start
|
||||||
|
|
||||||
You can download the theme manually by going to [https://github.com/panr/hugo-theme-hello-friend.git](https://github.com/panr/hugo-theme-hello-friend.git) and pasting it to `themes/hello-friend` in your root directory.
|
You can download the theme manually by going to [https://github.com/panr/hugo-theme-hello-friend.git](https://github.com/panr/hugo-theme-hello-friend.git) and pasting it to `themes/hello-friend` in your root directory.
|
||||||
|
@ -14,6 +14,14 @@
|
|||||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
<channel>
|
<channel>
|
||||||
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||||
|
|
||||||
|
{{ if .Site.Params.RssImage }}<image>
|
||||||
|
<url>{{ printf "%s%s" .Permalink .Site.Params.RssImage }}</url>
|
||||||
|
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||||
|
<link>{{ .Permalink }}</link>
|
||||||
|
</image>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<link>{{ .Permalink }}</link>
|
<link>{{ .Permalink }}</link>
|
||||||
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
|
||||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||||
|
Loading…
Reference in New Issue
Block a user