-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(more-categories): more-categories support documentation
- Loading branch information
Showing
3 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
68 changes: 68 additions & 0 deletions
68
documentation/content/Supported Plugins/more-categories.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` | ||
|
Binary file added
BIN
+35.4 KB
documentation/content/images/elegant-theme-more-categories-plugin-recent-post.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.24 KB
documentation/content/images/elegant-theme-more-categories-plugin-side-info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.