Merge pull request #175 from nikipore/pelican-bootstrap3-taglist-separator
made article tag separator configurable via TAG_LIST_SEPARATOR
This commit is contained in:
@@ -55,6 +55,10 @@ You can enable sharing buttons through [AddThis](http://www.addthis.com/) by set
|
|||||||
|
|
||||||
In order to make the Facebook like button work better, the template contains Open Graph metatags like `<meta property="og:type" content="article"/>`. You can disable them by setting `USE_OPEN_GRAPH` to `False`. You can use `OPEN_GRAPH_FB_APP_ID` to provide a Facebook _app id_. You can also provide a default image that will be passed to Facebook for the homepage of you site by setting `OPEN_GRAPH_IMAGE` to a relative file path, which will be prefixed by your site's static directory.
|
In order to make the Facebook like button work better, the template contains Open Graph metatags like `<meta property="og:type" content="article"/>`. You can disable them by setting `USE_OPEN_GRAPH` to `False`. You can use `OPEN_GRAPH_FB_APP_ID` to provide a Facebook _app id_. You can also provide a default image that will be passed to Facebook for the homepage of you site by setting `OPEN_GRAPH_IMAGE` to a relative file path, which will be prefixed by your site's static directory.
|
||||||
|
|
||||||
|
### Tag List
|
||||||
|
|
||||||
|
You can customize the separator between article tags with `TAG_LIST_SEPARATOR`. The default separator is `/`.
|
||||||
|
|
||||||
## Screenshot
|
## Screenshot
|
||||||
|
|
||||||

|

|
||||||
@@ -63,4 +67,4 @@ In order to make the Facebook like button work better, the template contains Ope
|
|||||||
|
|
||||||
## Live example
|
## Live example
|
||||||
|
|
||||||
[This is my website](http://dandydev.net)
|
[This is my website](http://dandydev.net)
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
{% if article.tags %}
|
{% if article.tags %}
|
||||||
<span class="label label-default">Tags</span>
|
{% if TAG_LIST_SEPARATOR is not defined %}
|
||||||
{% for tag in article.tags %}
|
{% set TAG_LIST_SEPARATOR = "/" %}
|
||||||
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
|
|
||||||
{% if not loop.last %}
|
|
||||||
/
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
|
||||||
|
<span class="label label-default">Tags</span>
|
||||||
|
{% for tag in article.tags %}
|
||||||
|
<a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
|
||||||
|
{% if not loop.last %}
|
||||||
|
{{ TAG_LIST_SEPARATOR }}
|
||||||
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user