From 322103f8f4cdd9f6e89795240215308383b8ff69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=B3ra=20Szepes?= Date: Fri, 17 Nov 2017 09:47:53 +0100 Subject: [PATCH] added page layout and example to create sub pages --- README.md | 19 +++++++++++++++++++ _layouts/page.html | 10 ++++++++++ pages/example.html | 13 +++++++++++++ pages/example_with_layout.html | 5 +++++ sass/default.scss | 2 +- 5 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 _layouts/page.html create mode 100644 pages/example.html create mode 100644 pages/example_with_layout.html diff --git a/README.md b/README.md index 5012758..2c7a7ff 100644 --- a/README.md +++ b/README.md @@ -54,3 +54,22 @@ In the `scripts` folder simply add a new js file. To include it, modify the `_in ``` Example is in `test.js`. + +## How to add a new subpage + +Add a new html file in the `pages` folder. It has to start like this: +``` +--- +permalink: /name-of-your-link +--- + + +``` + +If you want it to have a default look, you can add the `_layouts/page.html` layout to it, that includes the header and the js files. +``` +--- +permalink: /name-of-your-link +layout: page +--- +``` diff --git a/_layouts/page.html b/_layouts/page.html new file mode 100644 index 0000000..cd51f13 --- /dev/null +++ b/_layouts/page.html @@ -0,0 +1,10 @@ + + + {% include head.html %} + + + {{content}} + + {% include js_files.html %} + + diff --git a/pages/example.html b/pages/example.html new file mode 100644 index 0000000..1313d67 --- /dev/null +++ b/pages/example.html @@ -0,0 +1,13 @@ +--- +permalink: /first-example +--- + + + + + Example page + + + This is an example page + + diff --git a/pages/example_with_layout.html b/pages/example_with_layout.html new file mode 100644 index 0000000..7c72e95 --- /dev/null +++ b/pages/example_with_layout.html @@ -0,0 +1,5 @@ +--- +permalink: /first-example-layout +layout: page +--- +

This is an example page

diff --git a/sass/default.scss b/sass/default.scss index 758e520..3e882a4 100644 --- a/sass/default.scss +++ b/sass/default.scss @@ -4,6 +4,6 @@ body { color: blue; h1 { - color: red; + color: green; } }