Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using :page-layout: does not appear to work when using other levels #172

Closed
bgallantgit3 opened this issue Feb 1, 2018 · 3 comments
Closed
Assignees

Comments

@bgallantgit3
Copy link

The Creating Pages section shows a sample which works correctly; however, if you modify it slightly by changing the level, the info layout does not appear in the generated HTML. For example, change from level 0 to level 1:

== Sample Page
:page-layout: info

However, if I move page-layout to the top, then the info layout works. For example:

:page-layout: info
== Sample Page

I don't usually start my pages off with an attribute, so I am not sure if this is a bug or my lack of understand. I did not see a related issue. Thanks.

@mojavelinux
Copy link
Member

You are describing the behavior perfectly. The page-layout must be defined in the document header. That either means putting it below the document title (the single equals sign) or at the top of the document (an implicit document header).

For details, see http://asciidoctor.org/docs/user-manual/#doc-header

Think of the document header as a replacement for the front matter. Perhaps this could be better explained in the README. I'm open to suggestions for improved wording.

@bgallantgit3
Copy link
Author

Thank you, that it explains it nicely. I never saw that reference in the User Manual. I would recommend a simple update added to the end of https://github.com/asciidoctor/jekyll-asciidoc#creating-pages as you mentioned. For example:

Page variables must be defined in the document header. That means putting them below the document title (the single equals sign as shown in the sample) or at the top of the document for an implicit document header (such as two equal signs). For more details on the document header, see http://asciidoctor.org/docs/user-manual/#doc-header in the User Manual for details.

@mojavelinux mojavelinux self-assigned this Oct 28, 2018
@mojavelinux
Copy link
Member

Documentation added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants