Skip to content

Commit

Permalink
Merge pull request ryanlelek#321 from mgdesign/add-categories-meta
Browse files Browse the repository at this point in the history
Add description in the meta categories file
  • Loading branch information
ryanlelek authored and Ankush Agarwal committed Jun 29, 2022
1 parent df661ea commit 8b569fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/core/contents.js
Expand Up @@ -99,6 +99,7 @@ async function processFile (config, activePageSlug, contentDir, filePath) {
active: activePageSlug.startsWith('/' + fileSlug),
class: 'category-' + contentProcessors.cleanString(fileSlug),
sort: dirMetadata.sort || sort,
description: dirMetadata.description || '',
files: []
};

Expand Down
3 changes: 2 additions & 1 deletion example/content/usage/category-meta.md
Expand Up @@ -8,5 +8,6 @@ Sort: 0
* Title - This variable will override the title based on the folder name.
* Sort - This variable will affect the sorting of the categories.
* ShowOnHome - Optional. If false, categoru won't show on the home page. Default behavior can be changed through `config.show_on_home_default`.
* Description - Optional. This variable will provide a variable to be used in the templates, for example in the hompage, to enhance and clarify the content of the category.

Note that `config.show_on_home_default` sets the default behavior for pages too.
Note that `config.show_on_home_default` sets the default behavior for pages too.

0 comments on commit 8b569fd

Please sign in to comment.