{"push_id":1160691935,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"385e62c65444cc4eaecaa72ea138e0c2e96a8054","before":"4cb14c1d2b20fd08636b28129f09672ec42466e7","commits":[{"sha":"281da1d54046556a280b2571d11cb8decda1dab6","author":{"name":"Alex Carney","email":"bc5cccafd5565142e692278c458a012729f19559@gmail.com"},"message":"Refactoring layouts and includes\n\nOk this is a LOT of changes. It aims to simplify the template system we\nhad many templates with near duplicate code with a lot of redundancy by\nrefactoring it in this way, while the complexity of some of the\ntemplates may have increased it should now be much easier to make\nsweeping changes across the site.\n\nFirst thing I should note is that these changes should not have any\nimpact on the current site! Any visitors to the site shouldn't even\nnotice that these changes have been made.\n\nSo what has changed? Let's go through it shall we...\n\n- There are now only 6 templates:\n  + `base.html`: This contains the majority of the HTML and defines most\n    of the HTML for each page. Every other template npw inherits from this.\n  + `blog.html`: This is for the main blog page and each category page\n  + `page.html`: This is sort of a \"default layout\" for most pages on\n     the site, like the archive and code of conduct pages.\n  + `post.html`: This defines the layout for all our blog posts and\n    includes things like the disqus comments\n  + `project.html`: Each project page uses this templates\n  + `reference.html`: In preparation for an overhaul of the reference\n    section of the site both languages and tools now use a common\n    reference template.\n\n- The following templates have been deleted:\n  + `default.html`: This has been renamed to `base.html`\n  + `landingpage.html`: The landing page now inherits from `base.html`\n  + `language.html`: Languages now use the reference template\n  + `sessions.html`: The sessions page now inherits from the page\n     template\n  + `tools.html`: The tools now use the reference template\n\n- The number of includes has been dramatically reduced, from 11 to 2.\n  This is mostly because most of the includes can now be incoporpated\n  into the templates above since there isn't the need to import the HTML\n  from across multiple templates. This frees up the includes folder for\n  snippets of HTML to be made available to content writers to enchance\n  what they can already do with markdown, (for example the\n  `image_caption` include from #218). The following changes have been\n  made:\n  + `catmenu.html`: This has been incorporated into the blog template\n  + `common_head`: This is now in the base template\n  + `footer.html`: This is now in the base template\n  + `header.html`: This is now in the base template\n  + `mwnu.html`: This is now in the base template\n  + `pagination_nav.html`: This is now in the blog template\n  + `post.html`: Modified to make use of the ability to pass parameters\n    to `{% include %}` statement so that it no longer depends on the\n    surrouding template to function. This means is can now be easily use\n    in more places\n  + `project_link`.html: This is now part of the getting involved page\n  + `session_info.html`: This has been modified to make use of the\n     ability to pass parameters to `{% include %}` statements. It no\n     longer depends on the surrounding template to function and can be\n     easily used in other places.\n  + `twitter_card_post.html`: This is now part of the base template\n  + `twitter_feed.html`: This is now part of the base template.\n\nThe last major change (there are a few small changes across nearly every\npage to make it compatible with the new system) is that there are a\nnumber of parameters you can pass to the base template to alter the way\nit generates the page. These are passed by setting certain values in the\nfront matter of any page which inherits from base.\n\n- You can disable the automatic generation of the menu at the top of the\n  page (the landing page does this) by setting:\n\n  ```\n  nomenu: true\n  ```\n  in the front matter of your page.\n\n- You can give the page an id (we do this on the blog and sessions page\n  so that theme makers can alter their themes based on sections of the\n  site). This is done by setting:\n\n  ```\n  pageid: <name>\n  ```\n  in the front matter of your page\n\n- You can specify extra javascript files that you want loaded on this\n  particular page (the documentation and session pages do this). This is\n  done by:\n\n  ```\n  script: /path/to/script.js\n  ```\n  or in the case of multiple scripts:\n\n  ```\n  script:\n    - /path/to/script.js\n    - http://even/works/for/remote/scripts.js\n  ```\n\n- Finally by default the base template generates a default structure\n  around the content it's given. This gives all our pages a default\n  \"look\". But sometimes this gets in the way - like with the landing\n  page or the category menu on the blog. So there is an option to\n  disable the generation of this default structure for a particular\n  page. This can be done by setting:\n\n  ```\n  nonstandard: true\n  ```\n  in the front matter of your page.","distinct":true,"url":"https://api.github.com/repos/CardiffMathematicsCodeClub/CardiffMathematicsCodeClub.github.io/commits/281da1d54046556a280b2571d11cb8decda1dab6"},{"sha":"385e62c65444cc4eaecaa72ea138e0c2e96a8054","author":{"name":"Adam Pohl","email":"145d79ccd7236c7a7bf933beebbd5a00820105ad@gmail.com"},"message":"Merge pull request #219 from alcarney/layout-refactor\n\nRefactoring layouts and includes","distinct":true,"url":"https://api.github.com/repos/CardiffMathematicsCodeClub/CardiffMathematicsCodeClub.github.io/commits/385e62c65444cc4eaecaa72ea138e0c2e96a8054"}]}
{"actor":{"display_login":"Huaraz2"}}