Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Archives configuration is done in the site's `_config.yml` file, under the `jeky
jekyll-archives:
enabled: []
layout: 'archive'
slug: nil
permalinks:
year: '/:year/'
month: '/:year/:month/'
Expand Down Expand Up @@ -93,6 +94,22 @@ layouts:

---

#### Slugs
| Key | Value type | Values |
|--------|------------|------------------------------------------------------------------------------------------------------|
| `slug` | String | A [mode for slugifying](https://www.rubydoc.info/github/jekyll/jekyll/Jekyll%2FUtils:slugify) titles |

##### Description

Specifies the mode to pass to `Jekyll::Utils.slugify`

##### Sample values
```yml
slug: none|raw|default|pretty|ascii|latin
```

---

#### Permalinks

| Key | Value type | Values |
Expand Down
3 changes: 2 additions & 1 deletion lib/jekyll-archives/archive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Archive < Jekyll::Page
path
url
permalink
slug
).freeze

# Initialize a new Archive page
Expand All @@ -33,7 +34,7 @@ def initialize(site, title, type, posts)

# Generate slug if tag or category
# (taken from jekyll/jekyll/features/support/env.rb)
@slug = Utils.slugify(title) if title.is_a? String
@slug = Utils.slugify(title, mode: @config.dig('slug')) if title.is_a? String

# Use ".html" for file extension and url for path
@ext = File.extname(relative_path)
Expand Down