From 010b8bc0da1d6426894bf72dbcb191ebdc5b4ba0 Mon Sep 17 00:00:00 2001 From: Nathan Parsons Date: Thu, 8 Aug 2019 15:58:42 +0100 Subject: [PATCH] Reorder and section options --- CHANGELOG.md | 6 +++ README.md | 2 +- blueprints.yaml | 102 ++++++++++++++++++++++++++++-------------------- glossary.yaml | 8 +++- 4 files changed, 72 insertions(+), 46 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98605e6..375aa83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v0.1.1 +## 2019-08-08 +1. [](#improved) + * Reordered and sectioned configuration options. + + # v0.1.0 ## 2019-08-08 diff --git a/README.md b/README.md index 6ac0fb4..dda550a 100644 --- a/README.md +++ b/README.md @@ -68,11 +68,11 @@ The Glossary plugin has the following configuration options: - `enabled` (bool): Determines whether the plugin is enabled. - `builtin_css` (bool): Whether to load the built-in CSS on the glossary page. +- `abbreviations` (bool): Whether to enable site-wide abbreviations (required Markdown Extra). - `show_search` (bool): Whether to show search on the glossary page (requires Simple Search). - `fa_search_icon` (text): Font Awesome icon to use in the search button (eg. `fas fa-search`). Setting this to an empty string displays the icon from the SimpleSearch plugin. - `fa_reset_icon`(text): Font Awesome icon to use in the search reset button (eg. `fas fa-times`). - `item_template` (text): Template to use for formatting glossary items. -- `abbreviations` (bool): Whether to enable site-wide abbreviations (required Markdown Extra). - `definitions` (list): List of arrays with the keys `term`, `abbrev`, and `definition`. diff --git a/blueprints.yaml b/blueprints.yaml index 37e3480..1e2fb48 100644 --- a/blueprints.yaml +++ b/blueprints.yaml @@ -1,5 +1,5 @@ name: Glossary -version: 0.1.0 +version: 0.1.1 description: Maintain a glossary of words and automatically add abbreviations to all pages via Markdown Extra. icon: list author: @@ -24,6 +24,7 @@ form: 0: PLUGIN_ADMIN.DISABLED validate: type: bool + builtin_css: type: toggle label: Use builtin CSS @@ -34,32 +35,7 @@ form: 0: PLUGIN_ADMIN.DISABLED validate: type: bool - show_search: - type: toggle - label: Search on glossary page - help: Requires Simple Search - highlight: 1 - default: 1 - options: - 1: PLUGIN_ADMIN.ENABLED - 0: PLUGIN_ADMIN.DISABLED - validate: - type: bool - fa_search_icon: - type: text - label: Search icon - placeholder: "eg. fas fa-search" - fa_reset_icon: - type: text - label: Reset icon - placeholder: "eg. fas fa-times" - item_template: - type: select - label: Item template - default: "dt_dd" - options: - "dt_dd": "Definition list (dl, dt, dd)" - "details_summary": "Accordion (details, summary)" + abbreviations: type: toggle label: Site-wide abbreviations @@ -71,22 +47,62 @@ form: 0: PLUGIN_ADMIN.DISABLED validate: type: bool - definitions: - type: list - style: vertical - label: Definitions - collapsed: true - collapsible: true + + glossary_section: + type: section + title: Glossary page + text: This section allows you to configure the glossary page; you can add this to your site by creating a page with the `glossary_plugin` template. Search functionality depends on the SimpleSearch plugin. fields: - .term: - type: text - label: Term + show_search: + type: toggle + label: Search on glossary page + help: Requires Simple Search + highlight: 1 + default: 1 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED validate: - required: true - .abbrev: + type: bool + + fa_search_icon: type: text - label: Abbreviation - .definition: - type: editor - size: small - label: Definition + label: Search icon + placeholder: "eg. fas fa-search" + + fa_reset_icon: + type: text + label: Reset icon + placeholder: "eg. fas fa-times" + + item_template: + type: select + label: Item template + default: "dt_dd" + options: + "dt_dd": "Definition list (dl, dt, dd)" + "details_summary": "Accordion (details, summary)" + + definitions_section: + type: section + title: Definitions and abbreviations + text: Below is where you define your glossary terms and abbreviations; you can use Markdown in your definitions. The order here doesn't matter; they will be presented in alphabetical order in the glossary. + fields: + definitions: + type: list + style: vertical + collapsed: true + collapsible: true + fields: + .term: + type: text + label: Term + validate: + required: true + .abbrev: + type: text + label: Abbreviation + .definition: + type: editor + size: small + label: Definition diff --git a/glossary.yaml b/glossary.yaml index 7c61223..ffff5b3 100644 --- a/glossary.yaml +++ b/glossary.yaml @@ -1,8 +1,12 @@ enabled: true builtin_css: true -show_search: true -item_template: "dt_dd" abbreviations: true + +show_search: true +fa_search_icon: 'fas fa-search' +fa_reset_icon: 'fas fa-times' +item_template: 'dt_dd' + definitions: - term: Some long complicated term