Skip to content

Commit

Permalink
Reorder and section options
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Parsons committed Aug 8, 2019
1 parent f2f64b1 commit 010b8bc
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 46 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v0.1.1
## 2019-08-08
1. [](#improved)
* Reordered and sectioned configuration options.


# v0.1.0
## 2019-08-08

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.


Expand Down
102 changes: 59 additions & 43 deletions blueprints.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -24,6 +24,7 @@ form:
0: PLUGIN_ADMIN.DISABLED
validate:
type: bool

builtin_css:
type: toggle
label: Use builtin CSS
Expand All @@ -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
Expand All @@ -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
8 changes: 6 additions & 2 deletions glossary.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 010b8bc

Please sign in to comment.