TheTyee / design-article.thetyee.ca

Working in the open on The Tyee's new article page design
http://thetyee.github.io/design-article.thetyee.ca/
Creative Commons Zero v1.0 Universal
3 stars 0 forks source link

Rationalize our layout file structure using nested layouts #375

Closed alexgreen closed 2 years ago

alexgreen commented 7 years ago

Right now a lot of stuff that should be in a master layout file is getting repeated in multiple layouts. E.g. Header, Tertiary components and Footer contents.

This stuff which is common to every article page should get consolidated into a default layout and then the Article components should get put in a nested layout. (See http://jekyll.tips/jekyll-casts/layouts/ ) Probably even articleheader.html and featured-media.html should be call from the default layout. Then the nested layouts would contain only the specific articlebody. (E.g. article__body-standard.html actually become a layout file rather than an include.)

OR maybe the contents of article__body should actually get written as the page file contents (e.g. within design-article.thetyee.ca/series.html and design-article.thetyee.ca/library.html). That would make a lot of sense but I don't know if Jekyll will process includes within the page file itself.

(Under either of these new scenarios everything in the _includes directory would remain where it is, EXCEPT all the files in _layouts/02-organisms/article would become either layout files in _layouts or they would become part of page files at the root —i.e. they would become {{ content }}.)

alexgreen commented 7 years ago

@MrBryan I'm seeing that our Jekyll layout files could be written in a much more efficient way (described above). I've put this on my to do list for the future (for after the section page design). If I do this will it impact how the live site is currently running? Could it cause any problems? (Everything in the _includes directory would remain where it is, EXCEPT all the files in _layouts/02-organisms/article would become either layout files in _layouts or they would become part of page files at the root.)

alexgreen commented 7 years ago

@Bryan, I may actually implement this for the section pages.

MrBryan commented 7 years ago

Hey Alex, that should be OK most of those I have not been able to use as an include because of all the perl that had to be mixed in

On Feb 20, 2017, at 5:40 PM, alexgreen notifications@github.com wrote:

@Bryan, I may actually implement this for the section pages.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.