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

Requires double newline after header #17

Closed
ralfstx opened this issue May 15, 2017 · 2 comments
Closed

Requires double newline after header #17

ralfstx opened this issue May 15, 2017 · 2 comments

Comments

@ralfstx
Copy link

ralfstx commented May 15, 2017

I have markdown files that look like:

---
---
# Header
Bla bla ...

This markdown is rendered by GitHub as expected, an extra linebreak after the header is not required. However, the title is only extracted if the header is followed by two newlines.

@benbalter
Copy link
Owner

Thanks @ralfstx! Would you be interested in submitting a pull request to implement this?

ralfstx added a commit to eclipsesource/tabris-js-docs that referenced this issue May 15, 2017
GitHub pages does not extract the page header unless the first header is followed by a double newline [1].
Add newlines after all headers.
Add a node script to fix markdown files.

benbalter/jekyll-titles-from-headings#17
@ralfstx
Copy link
Author

ralfstx commented May 16, 2017

@benbalter I'm sorry, but I don't have a ruby background and I'm lacking the knowledge and the tools to build and test a change.

My guess is that either the trailing \n or the $ needs to be removed from the regex in https://github.com/benbalter/jekyll-titles-from-headings/blob/master/lib/jekyll-titles-from-headings/generator.rb#L5

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

No branches or pull requests

2 participants