Skip to content
This repository has been archived by the owner on Jul 26, 2018. It is now read-only.

Commit

Permalink
added page layout and example to create sub pages
Browse files Browse the repository at this point in the history
  • Loading branch information
lordblendi committed Nov 17, 2017
1 parent b271336 commit 322103f
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 1 deletion.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---
<!-- content of your html file-->
```

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
---
```
10 changes: 10 additions & 0 deletions _layouts/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en-us">
{% include head.html %}

<body>
{{content}}

{% include js_files.html %}
</body>
</html>
13 changes: 13 additions & 0 deletions pages/example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
permalink: /first-example
---
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example page</title>
</head>
<body>
This is an example page
</body>
</html>
5 changes: 5 additions & 0 deletions pages/example_with_layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
permalink: /first-example-layout
layout: page
---
<h1>This is an example page</h1>
2 changes: 1 addition & 1 deletion sass/default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
body {
color: blue;
h1 {
color: red;
color: green;
}
}

0 comments on commit 322103f

Please sign in to comment.