diff --git a/.eleventy.js b/.eleventy.js index 08a8e33..93fdde0 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -5,7 +5,7 @@ module.exports = (config) => { config.addPassthroughCopy({ 'src/assets': 'assets' }); config.setFrontMatterParsingOptions({ excerpt: true, - excerpt_sperator: ' ', + excerpt_separator: '', }); config.setTemplateFormats(['jpg', 'png', 'webp', 'md', 'njk']); config.setBrowserSyncConfig({ diff --git a/package.json b/package.json index 8e24719..e109d9d 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build:eleventy": "eleventy", "build:webpack": "webpack", "clean": "rm -rf dist", - "start": "npm-run-all clean -p build:* -p start:*", + "start": "cross-env NODE_ENV=development npm-run-all clean -p build:* -p start:*", "start:eleventy": "eleventy --serve --quiet", "start:webpack": "webpack --watch", "test": "echo \"Error: no test specified\" && exit 1" diff --git a/src/_includes/footer.njk b/src/_includes/footer.njk new file mode 100644 index 0000000..781503f --- /dev/null +++ b/src/_includes/footer.njk @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/src/_includes/header.njk b/src/_includes/header.njk new file mode 100644 index 0000000..508de34 --- /dev/null +++ b/src/_includes/header.njk @@ -0,0 +1,31 @@ +
+
+ +
+
diff --git a/src/_includes/layout.njk b/src/_includes/layout.njk index 06afe84..cabb4ce 100644 --- a/src/_includes/layout.njk +++ b/src/_includes/layout.njk @@ -1,17 +1,23 @@ - - - - - + + + + + + - {{title}} + {{ title }} + {% include 'header.njk' %}
- {{content}} + {{ content | safe }}
+ {% include 'footer.njk' %} - \ No newline at end of file + diff --git a/src/_includes/post.njk b/src/_includes/post.njk new file mode 100644 index 0000000..a75c909 --- /dev/null +++ b/src/_includes/post.njk @@ -0,0 +1,10 @@ +--- +layout: layout.njk +--- + +
+

{{title}}

+ + {{content | safe}} + +
\ No newline at end of file diff --git a/src/about.njk b/src/about.njk new file mode 100644 index 0000000..c5fa34a --- /dev/null +++ b/src/about.njk @@ -0,0 +1,53 @@ +--- +title: About Me +layout: layout.njk +--- + +
+

This is the {{ title }} page.

+
+
+
+ hero +
+
+

+ "Something something something." +

+
+
+
+
diff --git a/src/assets/person.jpg b/src/assets/person.jpg new file mode 100644 index 0000000..3667678 Binary files /dev/null and b/src/assets/person.jpg differ diff --git a/src/blog/my-first-blog/doggo.jpg b/src/blog/my-first-blog/doggo.jpg new file mode 100644 index 0000000..d181e8b Binary files /dev/null and b/src/blog/my-first-blog/doggo.jpg differ diff --git a/src/blog/my-first-blog/index.md b/src/blog/my-first-blog/index.md new file mode 100644 index 0000000..b48896c --- /dev/null +++ b/src/blog/my-first-blog/index.md @@ -0,0 +1,69 @@ +--- +title: My First blog +layout: post.njk +featuredImage: ./doggo.jpg +pageTitle: This is my other Title +tags: ["post"] +--- + +Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dictum felis eu pede mollis pretium. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. + + + +```js +var s = "JavaScript syntax highlighting"; +alert(s); +``` + +```python +s = "Python syntax highlighting" +print s +``` + +``` +No language indicated, so no syntax highlighting. +But let's throw in a tag. +``` + +| Tables | Are | Cool | +| ------------- | :-----------: | ----: | +| col 3 is | right-aligned | $1600 | +| col 2 is | centered | $12 | +| zebra stripes | are neat | $1 | + +> Blockquotes are very handy in email to emulate reply text. +> This line is part of the same quote. + +Quote break. + +> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can _put_ **Markdown** into a blockquote. + +Three or more... + +--- + +Hyphens + +--- + +Asterisks + +--- + +Underscores + +Aenean commodo ligula eget dolor. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Integer tincidunt. + +Cras dapibus. Aenean vulputate eleifend tellus. Vivamus elementum semper nisi. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Donec vitae sapien ut libero venenatis faucibus. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. + +Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. + +Maecenas nec odio et ante tincidunt tempus. + +### h3 + +## h2 + +# h1 + +#### h4 diff --git a/src/blog/my-second-blog/index.md b/src/blog/my-second-blog/index.md new file mode 100644 index 0000000..a86c7dc --- /dev/null +++ b/src/blog/my-second-blog/index.md @@ -0,0 +1,71 @@ +--- +title: My Second blog +layout: post.njk +featuredImage: ./islands.jpg +pageTitle: This is my other Title +tags: ["post"] +--- + +Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dictum felis eu pede mollis pretium. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. + + + +```js +var s = "JavaScript syntax highlighting"; +alert(s); +``` + +```python +s = "Python syntax highlighting" +print s +``` + +``` +No language indicated, so no syntax highlighting. +But let's throw in a tag. +``` + +| Tables | Are | Cool | +| ------------- | :-----------: | ----: | +| col 3 is | right-aligned | $1600 | +| col 2 is | centered | $12 | +| zebra stripes | are neat | $1 | + +> Blockquotes are very handy in email to emulate reply text. +> This line is part of the same quote. + +Quote break. + +> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can _put_ **Markdown** into a blockquote. + +Three or more... + +--- + +Hyphens + +--- + +Asterisks + +--- + +Underscores + +Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam dictum felis eu pede mollis pretium. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. + +Aenean commodo ligula eget dolor. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Integer tincidunt. + +Cras dapibus. Aenean vulputate eleifend tellus. Vivamus elementum semper nisi. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Donec vitae sapien ut libero venenatis faucibus. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. + +Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem. + +Maecenas nec odio et ante tincidunt tempus. + +### h3 + +## h2 + +# h1 + +#### h4 diff --git a/src/blog/my-second-blog/islands.jpg b/src/blog/my-second-blog/islands.jpg new file mode 100644 index 0000000..471ade6 Binary files /dev/null and b/src/blog/my-second-blog/islands.jpg differ diff --git a/src/index.njk b/src/index.njk index 912e89a..22ab688 100644 --- a/src/index.njk +++ b/src/index.njk @@ -1,8 +1,58 @@ --- -title: Homepage +title: Home layout: layout.njk +pagination: + data: collections.post + size: 6 + reverse: true + alias: posts --- -
-

Hello to our blog

+
+

Welcome to our blog

+
+
+ {% for post in posts %} + {{ post.data.page | log }} +
+
+ content +

+ {{ post.data.title }} +

+

+ {{ post.data.page.excerpt }} +

+ + Read More + +
+
+ {% endfor %} +
+
diff --git a/webpack.config.js b/webpack.config.js index 8b7fc98..eeca440 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -18,7 +18,7 @@ module.exports = { }, plugins: [ new MiniCssExtractPlugin({ - filename: 'main.bulde.css', + filename: 'main.bundle.css', }), ], };