Fixes #3 - Added instructions to readme.md
This commit is contained in:
parent
9cba20c39c
commit
74fc7a4c11
18
Readme.md
18
Readme.md
@ -34,3 +34,21 @@ The content variable in \_config.pug defines your array of patterns. It is made
|
||||
|
||||
By changing and resaving the \_config.pug file, (our change is often adding or removing a random space) all of the pug patterns will recompile. Note that md templates will not recompile automatically when config is saved and updated as markdown files don't have an include.
|
||||
|
||||
## Including PugJS in Pug files without compiling
|
||||
If you wish to include Pug output as code in your instance, you can do this without manually creating a second 'dot container' version of the file. Including files with 'unrecognised' extensions does not compile them.
|
||||
|
||||
1. In your project config, create a Custom Tool called Pug pattern to pug file
|
||||
1. Check Process automatically and set the command to 'cp {{input}} {{output}}' on Mac/Linux and 'copy {{input}} {{output}}' on Windows. (This is just your operating system's command line file copy executable.)
|
||||
1. Set the Output to Relative to input
|
||||
1. Set the Output Extension to .pug
|
||||
|
||||
In your design system implementation,
|
||||
1. Create the files that you edit as _[pattern].pp files, and set them to auto compile. (You may wish to let your text editor know what they are, so the syntax highlighting works.
|
||||
1. Save the file, ensure that it is set to in prepros it is set to process automatically.
|
||||
1. Include the .pp file as your pug pattern with .language-pug and include the .pug file as your html output.
|
||||
|
||||
This will ensure that the .pug file will get processed and the .pp file will be handled as text will get compiled, but they should display correctly and remain in sync while maintaining the minimum number of files.
|
||||
|
||||
|
||||
## Credits
|
||||
This framework includes [PrismJS](https://prismjs.com/) for code syntax highlighting. PrismJS is released under the [MIT license](https://opensource.org/licenses/MIT)>
|
||||
|
Loading…
Reference in New Issue
Block a user