clayh53 / tufte-jekyll

Minimal Jekyll blog styled to resemble the look and layout of Edward Tufte's books
MIT License
620 stars 206 forks source link

Content in the margin should use <aside> #32

Closed reitzig closed 4 years ago

reitzig commented 8 years ago

In the spirit of semantic HTML, content put in the margin should be wrapped in <aside> tags.

(That can also be useful when filtering excerpts: simply hide all aside nodes.)

The way the plugins currently work, though, they create span-level nodes. <aside> is a block tag and illegal to use in the same way, i.e. within <p> tags. Kramdown will actually escape the tag.

So a larger redesign is necessary; I don't have a proposal right now.

ghost commented 8 years ago

Actually this is a design decision made by tufte-css developers, see the following 2 issues for extensive discussion on this:

https://github.com/edwardtufte/tufte-css/issues/24 https://github.com/edwardtufte/tufte-css/issues/40

If tufte-css moves to <aside> so should tufte-jekyll. Until then there really isn't an issue since as far as I know tufte-jekyll strives for parity with tufte-css.

clayh53 commented 8 years ago

I'm with Nick on this one. I think it is best to keep this jekyll theme in sync with the tufte.css as much as possible. And the sidenotes and marginnotes also behave semantically like footnotes as well. I am not sure that the HTML guidelines are for footnotes.

clayh53 commented 4 years ago

Thinking about this, I decided to try and add some <aside> wrappers around margin content. Turns out that the Ruby code just sort of barfs on that and it writes a literal "<aside>" into the HTML. I am not enough of a Rubyhead to understand what exactly is going on here, but I welcome any thoughts on this. When I wrapped an <aside> around the whole block, it disappears completely. Are asides invisible by default? For now, I will leave it semantically unstyled.