Skip to content

Commit

Permalink
docs(more-categories): more-categories support documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vokimon committed Jun 1, 2020
1 parent a1370f5 commit 8b44ee7
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions documentation/content/Supported Plugins/more-categories.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
Title: Articles with multiple categories
Tags: pelican-plugin, more-categories
Category: Supported Plugins
Date: 2020-06-02 10:14
Slug: articles-with-multiple-categories
Subtitle:
Summary: You can have articles with multiple categories
Keywords: categories
Authors: David García Garzón
---

Both tags and categories fullfill the purpose of relating your
by a subject or a kind of writting.
Tags are more open and free and
you can attach several of them to a single article.
Categories are a more closed set, they are
used to organize your writtings in classes
and you can only attach one category to every single article.

Depending on how you organize you website it might have sense
for an article to be in more than one category
and overcome that later restriction on categories.
The `more-categories` plugin fullfills this purpose
and enables multiple categories.

Besides `more-categories` enables hierarchies of categories.
You might have a `Sports` category, and then
a sub category talking about `Basketball`.
So you will be talking about `Sports/Basketball`.
Your articles about Basketball will be also
included when you look at the Sports category.

This is also useful to have a kind of [Trove classifiers](https://pypi.org/classifiers/).

When you specify several categories, Elegant will show you all
the categories an article is in.

![Recent Post List]({static}/images/elegant-theme-more-categories-plugin-recent-post.png)

![Article Side Info]({static}/images/elegant-theme-more-categories-plugin-side-info.png)


## Configuration

Just include the plugin in the configuration by adding:

```bash
$ pip install pelican-more-categories
```

```python
PLUGINS = [
...
'pelican.plugin.more_categories',
...
]
```

## Article Metadata

And then add several categories to an article by
using commas to separate them in the metadata:

```markdown
Category: One Category, Other Category, One Category/A subcategory
```

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8b44ee7

Please sign in to comment.