Skip to content

Conversation

@jaket-hub
Copy link

page inline partials with prefix
'layout-'
or options.inlinelayout
or Front Matter inlinelayout
can be used within layout

…within layout pages

modify render
 - only pages with inline partials
    - check for online partial(s) starting with "layout-", add them to Handlebars.partials
    - remove inline partial(s) text/string from page.body
 - all pages
    - check for Handlebars.partials starting with "layout-" and remove them

modify test
 - add in test files and modify test script
https://regex101.com/r/RF1IOl/1 - for matching handlebars comment

include numbers match in inline partials name
https://regex101.com/r/qFKeWd/2 for matching handlebars inline partial

handlebars comment removed from string for inline partial match

Test
 - added top and bottom partials above and below body respectively
 - added test pages for inline partials top, bottom and commented inline partials
add options.inlinelayout to readme
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant