fbrctr.github.io | This is the Fabricator instance used to build http : //fbrctr
kandi X-RAY | fbrctr.github.io Summary
kandi X-RAY | fbrctr.github.io Summary
This is the Fabricator instance used to build
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fbrctr.github.io
fbrctr.github.io Key Features
fbrctr.github.io Examples and Code Snippets
Community Discussions
Trending Discussions on fbrctr.github.io
QUESTION
I'm building a style guide using Fabricator, and the docs seem to indicate that I should be able to add 'controls' to let the users toggle visibility on various sections.
By default, Fabricator builds come with 3 main toggles: labels
, notes
, and code
. I want to add a 4th toggle that I'm calling styles
.
The relevant sections of the fabricator.js
file look like this:
ANSWER
Answered 2017-Aug-11 at 18:32The author (@lukeaskew) responded to my email inquiry and indicated that all 'front-matter' data gets packed up into data
(accessible as {{data}}
or {{{data}}}
), and to access or check the 'styles' data I was initially trying to add, I could simply enter {{{data.styles}}}
in my f-item-contents & f-item-controls files.
If that doesn't work for you for some reason or if you want a truly independent data section, you can follow the instructions as I've laid out below.
original answer bodyI figured out how to add control (content toggles) to Fabricator - hopefully this will help someone else.
For starters, I'm not certain, but I suspect that styles
(the name I gave to my custom control) may be a reserved word, because having it in the fabricator.js
file periodically causes the gulp task to stop running/fail. Unfortunately, (as of this posting) there's still no indication in the docs what the reserved words are other than that there's a list of reserved words.
To add a control
, in addition to the steps indicated in my question, you also need to modify the node_module
that assembles the site from the src
folder.
The file is located in your Fabricator folder at node_modules/fabricator-assemble/index.js
and you'll need to modify the following section (LINE ~332), replacing 'NEW_TOGGLE_NAME' with the name of your new control (same name you used in the sections mentioned in my question):
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install fbrctr.github.io
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page