mirror of
https://github.com/metagov/govarch-website.git
synced 2025-06-18 17:14:15 +00:00
resolves #8 add JSON feed
This commit is contained in:
19
README.md
19
README.md
@ -136,6 +136,20 @@ To use the post layout, add the following to your post's [front matter](https://
|
|||||||
layout: post
|
layout: post
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Icons
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
The [JSON Feed spec](https://jsonfeed.org/version/1) states that feeds should include an icon. To add your icon, add the following line in your site's `_config.yml` file:
|
||||||
|
|
||||||
|
```
|
||||||
|
feed_icon: /assets/images/icon-512.png
|
||||||
|
```
|
||||||
|
|
||||||
|
Then, replace the `/assets/images/icon-512.png` file with your own image.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Credits
|
### Credits
|
||||||
|
|
||||||
The theme credits that appear at the bottom of each page can be turned off by including the following line in your site's `_config.yml` file:
|
The theme credits that appear at the bottom of each page can be turned off by including the following line in your site's `_config.yml` file:
|
||||||
@ -154,7 +168,7 @@ A [copy of the license](https://github.com/patdryburgh/hitchens/blob/master/asse
|
|||||||
|
|
||||||
## Contributing & Requesting Features
|
## Contributing & Requesting Features
|
||||||
|
|
||||||
Bug reports, feature requests, and pull requests are welcome on GitHub at https://github.com/patdryburgh/hitchens.
|
Bug reports, feature requests, and pull requests are welcome on GitHub at [https://github.com/patdryburgh/hitchens](https://github.com/patdryburgh/hitchens).
|
||||||
|
|
||||||
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
||||||
|
|
||||||
@ -166,5 +180,4 @@ The theme is setup just like a normal Jekyll site. To test the theme, run `bundl
|
|||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
The code for this theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
||||||
|
|
@ -19,6 +19,7 @@ description: >- # this means to ignore newlines until "baseurl:"
|
|||||||
An inarguably well-designed Jekyll theme.
|
An inarguably well-designed Jekyll theme.
|
||||||
baseurl: "/hitchens" # the subpath of your site, e.g. /blog
|
baseurl: "/hitchens" # the subpath of your site, e.g. /blog
|
||||||
url: "https://patdryburgh.github.io" # the base hostname & protocol for your site, e.g. http://example.com
|
url: "https://patdryburgh.github.io" # the base hostname & protocol for your site, e.g. http://example.com
|
||||||
|
icon: /assets/images/icon-512.png
|
||||||
twitter_username: patdryburgh
|
twitter_username: patdryburgh
|
||||||
github_username: patdryburgh
|
github_username: patdryburgh
|
||||||
|
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
<link rel="stylesheet" href="{{ '/assets/css/main.css' | absolute_url }}?{{ site.time | date: '%s%N' }}">
|
<link rel="stylesheet" href="{{ '/assets/css/main.css' | absolute_url }}?{{ site.time | date: '%s%N' }}">
|
||||||
|
|
||||||
|
<link rel="apple-touch-icon" href="{{ site.icon }}">
|
||||||
|
|
||||||
{%- if jekyll.environment == 'production' and site.google_analytics -%}
|
{%- if jekyll.environment == 'production' and site.google_analytics -%}
|
||||||
{%- include google-analytics.html -%}
|
{%- include google-analytics.html -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
BIN
assets/images/icon-512.png
Normal file
BIN
assets/images/icon-512.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
favicon.ico
Normal file
BIN
favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
32
feed.json
Normal file
32
feed.json
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
layout: null
|
||||||
|
---
|
||||||
|
{
|
||||||
|
"version": "https://jsonfeed.org/version/1",
|
||||||
|
"title": "{{ site.title | xml_escape }}",
|
||||||
|
"home_page_url": "{{ site.baseurl | absolute_url }}",
|
||||||
|
"feed_url": "{{ "/feed/index.json" | absolute_url }}",
|
||||||
|
"description": {{ site.description | jsonify }},
|
||||||
|
"icon": "{{ site.icon | absolute_url }}",
|
||||||
|
"favicon": "{{ "/favicon.ico" | absolute_url }}",
|
||||||
|
"expired": false,
|
||||||
|
"items": [
|
||||||
|
{% for post in site.posts limit: 15 %}
|
||||||
|
{% unless post.draft %}
|
||||||
|
{% capture content_text %}{{ post.content | strip_html }}{% endcapture %}
|
||||||
|
{% capture content_html %}{{ post.content | markdownify }}{% endcapture %}
|
||||||
|
{
|
||||||
|
"id": "{{ post.url | absolute_url | sha1 }}",
|
||||||
|
{% if post.title != "" %}"title": {{ post.title | jsonify }},{% endif %}
|
||||||
|
"content_text": {{ content_text | jsonify }},
|
||||||
|
"content_html": {{ content_html | jsonify }},
|
||||||
|
"url": "{{ post.url | absolute_url}}",
|
||||||
|
"date_published": "{{ post.date | date_to_xmlschema }}",
|
||||||
|
"date_modified": "{{ post.date | date_to_xmlschema }}",
|
||||||
|
"author": {
|
||||||
|
"name": "{{ post.author }}"
|
||||||
|
}
|
||||||
|
{% endunless %}
|
||||||
|
{% endfor %}
|
||||||
|
]
|
||||||
|
}
|
Reference in New Issue
Block a user