add boilerplate
This commit is contained in:
18
src/_includes/layout/base.njk
Normal file
18
src/_includes/layout/base.njk
Normal file
@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="/css/styles.css" />
|
||||
<title>{{ title }}</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>{% include 'partials/header.njk' %}</header>
|
||||
<nav>{% include 'partials/navigation.njk' %}</nav>
|
||||
<main>
|
||||
<h1>{{ title }}</h1>
|
||||
{{ content | safe }}
|
||||
</main>
|
||||
<footer>{% include 'partials/footer.njk' %}</footer>
|
||||
</body>
|
||||
</html>
|
5
src/_includes/layout/blog.njk
Normal file
5
src/_includes/layout/blog.njk
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
layout: layout/base.njk
|
||||
---
|
||||
|
||||
<article>{{ content | safe}}</article>
|
1
src/_includes/partials/footer.njk
Normal file
1
src/_includes/partials/footer.njk
Normal file
@ -0,0 +1 @@
|
||||
<p>This is my footer | © 2022 Me.</p>
|
1
src/_includes/partials/header.njk
Normal file
1
src/_includes/partials/header.njk
Normal file
@ -0,0 +1 @@
|
||||
<h1>Welcome to my Homepage</h1>
|
7
src/_includes/partials/navigation.njk
Normal file
7
src/_includes/partials/navigation.njk
Normal file
@ -0,0 +1,7 @@
|
||||
<a href="/">Home</a>
|
||||
<a href="/about/">About</a>
|
||||
<a href="/links/">Links</a>
|
||||
<a href="/blog/">Blog</a>
|
||||
<a href="/contact/">Contact</a>
|
||||
|
||||
{#INFO: It's important to stucture your links with the slashes / on either side of the href /about/ to ensure the links are always from the root of the site.#}
|
Reference in New Issue
Block a user