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

Add ability to ignore YAML front matter #994

Closed
eggshell opened this issue Feb 9, 2017 · 8 comments
Closed

Add ability to ignore YAML front matter #994

eggshell opened this issue Feb 9, 2017 · 8 comments
Labels

Comments

@eggshell
Copy link

eggshell commented Feb 9, 2017

Since github officially supports jekyll as its static site generator for github pages, there should be a way to ensure front matter can be excluded from rendering when being displayed on github.com

@kivikakk
Copy link
Contributor

This a tricky one; do you have any suggested implementations? We could scan the front matter for a particular key, for instance.

@andyjeffries
Copy link

I was just looking for this and was going to build it in my app. I'm planning on doing it like this:

html = my_markdown.gsub(/\A\-\-\-(\r\n?|\n).*?\-\-\-(\r\n?|\n)+/m, '')

That removes an initial line of --- followed by an OS-flexible line break, then a minimum number of characters until a closing --- and one or more OS-flexible line breaks.

Might help...

@kivikakk
Copy link
Contributor

@andyjeffries 👋 Thanks for that! Seeing as we're already parsing it out, I think the actual act of removing it should be simple; my concern is more around controlling how we trigger the behaviour. I'm struggling to come up with a neat way to do this that doesn't feel orthogonal to the design.

@morallo
Copy link

morallo commented Jul 27, 2021

What about defining a specific variable yaml-frontmatter-display: false inside the frontmatter itself?

@mwestphal
Copy link

I wish this was possible. The front matter table the appears in github has no purpose.

@goto-dev-null
Copy link

goto-dev-null commented Aug 23, 2024

I wish this was possible.

Is it not? I see this issue was mentioned in "Rework Documentation completely" but the conversation seemed to be inconclusive.

Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Dec 12, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 20, 2024
@RokeJulianLockhart
Copy link

#994 (comment)

@GitHub-Actions, it remains relevant. See actions/stale#1190 (comment).

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

No branches or pull requests

7 participants