Docs: describe difference between tags and categories (#6882)
Merge pull request 6882
This commit is contained in:
parent
69e2c65be6
commit
6786970c96
|
@ -201,8 +201,32 @@ category: blog
|
|||
|
||||
In this case, the listing pages will be accessible at `{baseurl}/category/blog.html`
|
||||
|
||||
While this example is done with categories, you can easily extend your lists to
|
||||
filter by tags or any other variable created with extensions.
|
||||
Although categories and tags are very similar, they are used to group posts,
|
||||
there are a few differences between them. Categories and sub-categories create
|
||||
hierarchies that, by default, are reflected in the directory structure of your
|
||||
site. A post with the following header
|
||||
```yaml
|
||||
---
|
||||
layout: post
|
||||
title: A Trip
|
||||
category: [ blog, travel ]
|
||||
---
|
||||
```
|
||||
will be accessible at `{baseurl}/blog/travel/year/month/day/A-Trip.html`. On
|
||||
the other hand, a tagged post
|
||||
```yaml
|
||||
---
|
||||
layout: post
|
||||
title: A Trip
|
||||
tags: [ blog, travel ]
|
||||
---
|
||||
```
|
||||
will be saved as `{baseurl}/year/month/day/A-Trip.html`. It is up to you to
|
||||
create `{baseurl}/tag/blog.html` and `{baseurl}/tag/blog.html` the same way as
|
||||
described above for categories.
|
||||
|
||||
While this example is done with tags and categories, you can easily extend your
|
||||
lists to filter by any other variable created with extensions.
|
||||
|
||||
## Post excerpts
|
||||
|
||||
|
|
Loading…
Reference in New Issue