1
0
Fork 0
forked from github/pelican

Merge pull request #1703 from ingwinlu/remove_tag_cloud

Remove tag_cloud from Pelican core
This commit is contained in:
Justin Mayer 2015-05-13 23:19:24 +02:00
commit 8786732044
4 changed files with 11 additions and 79 deletions

View file

@ -241,3 +241,12 @@ purposes. This can be achieved by explicitly specifying only the
filenames of those articles in ``ARTICLE_PATHS``. A list of such
filenames could be found using a command similar to ``cd content;
find -name '*.md' | head -n 10``.
My tag-cloud is missing/broken since I upgraded Pelican
=======================================================
In an ongoing effort to steamline Pelican, `tag_cloud` generation has been
moved out of the pelican core and into a separate `plugin
<https://github.com/getpelican/pelican-plugins/tree/master/tag_cloud>`_.
See the :ref:`plugins` documentation further information about the
Pelican plugin system.

View file

@ -625,53 +625,6 @@ This would cause the first page to be written to
``page/{number}`` directories.
Tag cloud
=========
If you want to generate a tag cloud with all your tags, you can do so using the
following settings.
================================================ =====================================================
Setting name (followed by default value) What does it do?
================================================ =====================================================
``TAG_CLOUD_STEPS = 4`` Count of different font sizes in the tag
cloud.
``TAG_CLOUD_MAX_ITEMS = 100`` Maximum number of tags in the cloud.
================================================ =====================================================
The default theme does not include a tag cloud, but it is pretty easy to add one::
<ul class="tagcloud">
{% for tag in tag_cloud %}
<li class="tag-{{ tag.1 }}"><a href="{{ SITEURL }}/{{ tag.0.url }}">{{ tag.0 }}</a></li>
{% endfor %}
</ul>
You should then also define CSS styles with appropriate classes (tag-1 to tag-N,
where N matches ``TAG_CLOUD_STEPS``), tag-1 being the most frequent, and
define a ``ul.tagcloud`` class with appropriate list-style to create the cloud.
For example::
ul.tagcloud {
list-style: none;
padding: 0;
}
ul.tagcloud li {
display: inline-block;
}
li.tag-1 {
font-size: 150%;
}
li.tag-2 {
font-size: 120%;
}
...
Translations
============