-
Notifications
You must be signed in to change notification settings - Fork 124
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
Add omitFrontmatter attribute to include #1448
Add omitFrontmatter attribute to include #1448
Conversation
@ang-zeyu , I was trying to check a test that I have written for this and I noticed that when I run |
Dosen't sound right
is this run on just the core package? or at the root? (as vue-components package has 4 test suites) if not, try running the
You can create a quick failing test to make sure (e.g. |
Tried testing within the Checked the github action logs as well, only 4 too Perhaps because naming of the test file? It is (Edit: Looks like the tests are outdated, the way the includes are structured is different. I might need to rewrite the expected html of the tests...) |
Yikes, nice catch, I renamed it at one point I'll fix it in a separate PR shortly, unless you've already started
If you're fixing it, the diffs are expected and are a result of the combining markdown processing and |
I see. I'm on it, will create another PR soon. 👍 |
@ang-zeyu I am now all done with this PR, can you help take a look on the code and the tests? |
What is the purpose of this pull request?
Resolves #720
Overview of changes:
omitFrontmatter
attribute to<include>
so that the frontmatter data of the included page will not be present to override the "parent" page's frontmatter.processingOptions
toContext
to contain options that are relevant for processing, such as discarding front matter data.omitFrontmatter
attribute is present.Anything you'd like to highlight / discuss:
Testing instructions:
Proposed commit message: (wrap lines at 72 characters)
Add omitFrontmatter attribute to include
Including a file combines the front matter of the file with the main
page. When authors wish to include the full content of the file but not
the front matter, they have to make their whole content a segment as a
work around, making the content less concise.
Let's add a new attribute to indicate whether the front matter data of
the included file should be omitted.
Checklist: ☑️