mirror of
https://github.com/nairobilug/pelican-alchemy.git
synced 2024-12-30 12:15:06 +01:00
Add sitemap support
This commit is contained in:
parent
e9c06d6e7b
commit
34cbd13c28
2 changed files with 40 additions and 0 deletions
10
README.md
10
README.md
|
|
@ -2,20 +2,24 @@
|
||||||
|
|
||||||
A theme for the [Pelican](http://getpelican.com) static site generator. A shameless rip off of @porterjamesj's [crowsfoot](http://github.com/porterjamesj/crowsfoot) theme.
|
A theme for the [Pelican](http://getpelican.com) static site generator. A shameless rip off of @porterjamesj's [crowsfoot](http://github.com/porterjamesj/crowsfoot) theme.
|
||||||
|
|
||||||
|
|
||||||
## Screenshot
|
## Screenshot
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
`git clone https://github.com/nairobilug/pelican-alchemy.git`
|
`git clone https://github.com/nairobilug/pelican-alchemy.git`
|
||||||
|
|
||||||
Then set the pelican config variable `THEME` to the `alchemy` folder inside the cloned path.
|
Then set the pelican config variable `THEME` to the `alchemy` folder inside the cloned path.
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Pelican [documentation](http://docs.getpelican.com/en/latest/)
|
Pelican [documentation](http://docs.getpelican.com/en/latest/)
|
||||||
|
|
||||||
|
|
||||||
### Theme Options
|
### Theme Options
|
||||||
|
|
||||||
| Config | Type | Description |
|
| Config | Type | Description |
|
||||||
|
|
@ -43,6 +47,12 @@ An RSS icon will also appear on the nav if `FEED_ATOM` or `FEED_RSS` is set.
|
||||||
| GOOGLE_ANALYTICS_ID | TEXT | Google analytics |
|
| GOOGLE_ANALYTICS_ID | TEXT | Google analytics |
|
||||||
| GOOGLE_ANALYTICS_DOMAIN | TEXT | Google analytics |
|
| GOOGLE_ANALYTICS_DOMAIN | TEXT | Google analytics |
|
||||||
|
|
||||||
|
|
||||||
|
#### Sitemap
|
||||||
|
|
||||||
|
Ref: https://github.com/getpelican/pelican/wiki/Tips-n-Tricks#generate-sitemapxml
|
||||||
|
|
||||||
|
|
||||||
## Live Demo
|
## Live Demo
|
||||||
|
|
||||||
[nairobilug.or.ke](http://nairobilug.or.ke)
|
[nairobilug.or.ke](http://nairobilug.or.ke)
|
||||||
|
|
|
||||||
30
alchemy/templates/sitemap.html
Normal file
30
alchemy/templates/sitemap.html
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
{% for article in articles %}
|
||||||
|
<url>
|
||||||
|
<loc>{{ SITEURL }}/{{ article.url }}</loc>
|
||||||
|
<priority>0.8</priority>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
{% for translation in article.translations %}
|
||||||
|
<url>
|
||||||
|
<loc>{{ SITEURL }}/{{ translation.url }}</loc>
|
||||||
|
<priority>0.8</priority>
|
||||||
|
</url>
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% for page in pages %}
|
||||||
|
<url>
|
||||||
|
<loc>{{ SITEURL }}/{{ page.url }}</loc>
|
||||||
|
<priority>1.0</priority>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
{% for translation in page.translations %}
|
||||||
|
<url>
|
||||||
|
<loc>{{ SITEURL }}/{{ translation.url }}</loc>
|
||||||
|
<priority>1.0</priority>
|
||||||
|
</url>
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
</urlset>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue