diff options
author | Volpeon <git@volpeon.ink> | 2021-05-24 20:39:48 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2021-05-24 20:39:48 +0200 |
commit | a26deffdc9071a5558996948fcecb71d582870d0 (patch) | |
tree | 7098b3edab52b0084f16d8a367f90a04fcb70948 /scripts | |
parent | Improved link + accent colors (diff) | |
download | volpeon.ink-a26deffdc9071a5558996948fcecb71d582870d0.tar.gz volpeon.ink-a26deffdc9071a5558996948fcecb71d582870d0.tar.bz2 volpeon.ink-a26deffdc9071a5558996948fcecb71d582870d0.zip |
Better file structure, remove categories as special concept
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/metadata_filter.lua | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/scripts/metadata_filter.lua b/scripts/metadata_filter.lua index 914cd09..000fda6 100644 --- a/scripts/metadata_filter.lua +++ b/scripts/metadata_filter.lua | |||
@@ -120,15 +120,6 @@ function resolve_namespace(namespace) | |||
120 | return {root = {id = root, ["is_" .. root] = true}, full = namespace} | 120 | return {root = {id = root, ["is_" .. root] = true}, full = namespace} |
121 | end | 121 | end |
122 | 122 | ||
123 | function resolve_category(categories, category) | ||
124 | if categories and category then | ||
125 | category = pandoc.utils.stringify(category) | ||
126 | data = categories[category] | ||
127 | data.id = category | ||
128 | return data | ||
129 | end | ||
130 | end | ||
131 | |||
132 | function prep_menu(active_id, main_menu) | 123 | function prep_menu(active_id, main_menu) |
133 | local active_item = nil | 124 | local active_item = nil |
134 | 125 | ||
@@ -208,8 +199,6 @@ function process(global, meta) | |||
208 | meta.last_update = meta.date | 199 | meta.last_update = meta.date |
209 | end | 200 | end |
210 | 201 | ||
211 | meta.category = resolve_category(global.categories[meta.namespace.root.id], meta.category) | ||
212 | |||
213 | if meta.menus and meta.menus.main then | 202 | if meta.menus and meta.menus.main then |
214 | meta.menus.main = prep_menu(meta.namespace.root.id, meta.menus.main) | 203 | meta.menus.main = prep_menu(meta.namespace.root.id, meta.menus.main) |
215 | end | 204 | end |