From 3451fb89627eb5a759a450ede0b1738680bc7816 Mon Sep 17 00:00:00 2001 From: Devon Rueckner Date: Tue, 17 Nov 2020 12:33:16 -0800 Subject: [PATCH 1/2] add documentation about using icons in rst --- docs/pages/icons/index.vue | 29 +++++++++++++++++++++++++++++ nuxt.config.js | 5 +++++ 2 files changed, 34 insertions(+) diff --git a/docs/pages/icons/index.vue b/docs/pages/icons/index.vue index ab8d57ad7..1dfd5e3d3 100644 --- a/docs/pages/icons/index.vue +++ b/docs/pages/icons/index.vue @@ -80,6 +80,19 @@

If the default Material icon library and/or community-contributed libraries are insufficient, use to create a new one.

+ +

+ For use in documentation such as the , all icons above have available in reStructuredText replacement syntax below: +

+ +

+ Copy and paste it into a file such as rstIconReplacements.txt and then add it to your conf.py file . +

+

+ Then in *.rst files you can use, for example, |video| to insert the video icon. Note that these icons will not have screen-reader-accessible labels associated with them, so they should always be accompanied by descriptive text. +

+
+ @@ -87,12 +100,18 @@ @@ -105,4 +124,14 @@ fill: blue !important; } + .replacements { + display: block; + width: 100%; + height: 100px; + font-size: smaller; + white-space: pre; + border: 1px solid #dedede; + border-radius: 4px; + } + diff --git a/nuxt.config.js b/nuxt.config.js index d4acf9962..39b07dfe0 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -47,6 +47,11 @@ export default { test: /\.tbx$/, loader: 'xml-loader', }); + // allow this file to be displayed + config.module.rules.push({ + test: /rstIconReplacements.txt/, + loader: 'raw-loader', + }); config.devtool = 'source-map'; }, cssSourceMap: true, From cd0014a0315f14401521d016789c8cda2afe6f1e Mon Sep 17 00:00:00 2001 From: Devon Rueckner Date: Tue, 17 Nov 2020 12:37:58 -0800 Subject: [PATCH 2/2] change link --- docs/pages/icons/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/pages/icons/index.vue b/docs/pages/icons/index.vue index 1dfd5e3d3..71430463f 100644 --- a/docs/pages/icons/index.vue +++ b/docs/pages/icons/index.vue @@ -82,7 +82,7 @@

- For use in documentation such as the , all icons above have available in reStructuredText replacement syntax below: + For use in documentation such as the , all icons above have substitutions available in below: