`note.html` breaks with `{{ content }}`
HFulcher opened this issue · 6 comments
Describe the bug
When serving the Jekyll site any page that is based off a markdown note pushes any html tag after {{ content }}
outside of the <main>
tag. It would seem that something with the generation of the html from {{ content }}
is breaking the html.
To reproduce
Steps to reproduce the behavior:
- In
note.html
add a<p>
tag with text under{{ content }}
- Run
bundle exec jekyll serve
- Navigate to a note page and open inspector
- See that the
<p>
tag is pushed outside<main>
and exists at top level of<body>
Expected behavior
Tags after {{ content }}
should keep within the appropriate parent tag.
Desktop (please complete the following information):
- Operating system: macOS 11.3.1
- Ruby version: 3.0.0
I should add that this breaks the linked notes sidebar which is how I discovered the issue in the first place.
The side
tag gets pushed outside of main where it can't be seen by the notes container to handle the grid layout.
Doing some more digging, it seems that the problem lies with setting open_external_links_in_new_tab
to true
in _config.yml
. I've disabled it for now, the issue may be to do with the fact I have restructured the collections to fit having a blog as well but this issue seems to be present in the site as is without any changes.
Hello! Thanks for the bug report. I'm having trouble replicating it though, and added a counter-example on the demo website in 76ac51b:
digital-garden-jekyll-template/_layouts/note.html
Lines 14 to 18 in 76ac51b
Let me know if this works on your machine.
Hi @maximevaillancourt, sorry I haven't had a chance to look at this yet. I will take a look this week and let you know!
Hey @maximevaillancourt, I can confirm that the change in 76ac51b makes a line appear at the end of every note page.
Excellent, thank you for reporting back. Closing this.