jekyll_website_overhaul
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| jekyll_website_overhaul [2019/09/11 23:48] – tell | jekyll_website_overhaul [2019/09/12 00:40] (current) – [The Home Page is Special] tell | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| Looking at the html pages of the prototype site, we see that each one has a lot of code that is the same, and some content that's different. | Looking at the html pages of the prototype site, we see that each one has a lot of code that is the same, and some content that's different. | ||
| - | * top stuff, including the ''< | + | |
| - | * some stylesheet overrides | + | * some stylesheet overrides |
| - | * navigation menu bar | + | * navigation menu bar |
| - | * text content, that changes | + | * text content, that changes |
| - | * footer | + | * footer |
| The " | The " | ||
| Line 18: | Line 18: | ||
| ===== head.html ===== | ===== head.html ===== | ||
| - | The ''< | + | Most of the guts of the ''< |
| It looks like: | It looks like: | ||
| + | < | ||
| + | <meta charset=" | ||
| + | <meta http-equiv=" | ||
| + | <meta name=" | ||
| + | <meta name=" | ||
| + | <meta name=" | ||
| + | <link rel=" | ||
| + | < | ||
| + | <!-- Bootstrap core CSS --> | ||
| + | <link rel=" | ||
| + | < | ||
| + | {% include css/ | ||
| + | </ | ||
| + | </ | ||
| + | Only one tiny piece of of this file isn't copied verbatim from the prototype site design: | ||
| + | the HTML ''< | ||
| + | and put in '' | ||
| + | as it gets generated. | ||
| + | ===== Navigation Bar ===== | ||
| + | The navigation bar code goes into '' | ||
| + | We also preserve the google analytics code that was in the old website. | ||
| + | What nav.html looks like | ||
| + | ===== footer html ===== | ||
| + | |||
| + | Our page footer consists mainly of a copyright symbol and a date. '' | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | ===== end-of-page code ===== | ||
| + | |||
| + | Taking another cue from the old jekyll website, we look at the new html for common code that goes at the bottom of every page body. In '' | ||
| + | javascript includes used in the new page, which happen to match those in the [[https:// | ||
| + | |||
| + | link to end.html in github. | ||
| + | |||
| + | ===== Layout template for a page ===== | ||
| + | |||
| + | With those include files set up, we can now stitch back together most of the standard pages in the new site. | ||
| + | |||
| + | Page layouts are done with templates in the '' | ||
| + | |||
| + | Here's '' | ||
| + | |||
| + | <code html> | ||
| + | < | ||
| + | <html lang=" | ||
| + | < | ||
| + | {% include head.html %} | ||
| + | </ | ||
| + | < | ||
| + | <div id=" | ||
| + | <!-- Navigation bar --> | ||
| + | {% include nav.html %} | ||
| + | <!-- Main body --> | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | <h2 align=" | ||
| + | </ | ||
| + | <hr> {% include footer.html %} | ||
| + | </ | ||
| + | {% include end.html %} | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | The best thing about these layout templates is that they' | ||
| + | |||
| + | Some of the things we see in there are the include statements for head, nav, and end; they look like | ||
| + | '' | ||
| + | |||
| + | There' | ||
| + | content for the page. | ||
| + | |||
| + | ====== Page Content ====== | ||
| + | |||
| + | Finally, we get to put together a page. The new " | ||
| + | paragraphs of text. The markdown source for that page goes into '' | ||
| + | and starts off with a simple header: | ||
| + | |||
| + | < | ||
| + | --- | ||
| + | title: Contact Us | ||
| + | layout: standard | ||
| + | --- | ||
| + | </ | ||
| + | Unless you know what you're doing (or have read more markdown documentation than I have) | ||
| + | put four lines exactly like these into the .md file for each page. That' | ||
| + | * three dashes | ||
| + | * title: followed by the actual page title | ||
| + | * layout: followed by the name of the page layout template, here '' | ||
| + | |||
| + | The file continues wiht the actual text for the page, starting with: | ||
| + | |||
| + | < | ||
| + | To contact the Eastbots, please email us at < | ||
| + | </ | ||
| + | |||
| + | Note that the markdown content can include some html, but that it generally doesn' | ||
| + | |||
| + | |||
| + | ====== The Home Page is Special ====== | ||
| + | |||
| + | The main home landing page is special: it doesn' | ||
| + | '' | ||
| + | |||
| + | The text in the card comes from the to level '' | ||
| + | |||
| + | We actually could just put the whole thing into a single html file in the github repo, but breaking it up this way is useful for several reasons: | ||
| + | * we can reuse this layout if we want. | ||
| + | * the text can still be edited in its own markdown file, even by someone who doesn' | ||
| + | * an opportunity to learn more jekyll | ||
| + | |||
| + | '' | ||
| + | |||
| + | <code html> | ||
| + | < | ||
| + | <html lang=" | ||
| + | < | ||
| + | {% include head.html %} | ||
| + | < | ||
| + | {% include css/ | ||
| + | </ | ||
| + | </ | ||
| + | < | ||
| + | <div id=" | ||
| + | {% include nav.html %} | ||
| + | <div id=" | ||
| + | <div class=" | ||
| + | <div class=" | ||
| + | {{ content }} | ||
| + | </ | ||
| + | </ | ||
| + | <hr> | ||
| + | {% include footer.html %} | ||
| + | </ | ||
| + | {% include end.html %} | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | TODO get this page up too. | ||
jekyll_website_overhaul.1568260121.txt.gz · Last modified: 2019/09/11 23:48 by tell
