feat: reset post

This commit is contained in:
Matthew McKinnon 2024-09-18 23:29:53 +10:00
parent 2129e0dce8
commit 11cbf5d003
8 changed files with 52 additions and 41 deletions

View File

@ -2,6 +2,10 @@ const blogTools = require("eleventy-plugin-blog-tools");
const markdownIt = require("markdown-it");
const markdownItAttrs = require("markdown-it-attrs");
// Import prior to `module.exports` within `.eleventy.js`
const { DateTime } = require("luxon");
module.exports = function(eleventyConfig) {
const mdOptions = {
html: true,
@ -12,6 +16,11 @@ module.exports = function(eleventyConfig) {
.use(markdownItAttrs)
.disable("code");
eleventyConfig.addFilter("postDate", (dateObj) => {
return DateTime.fromJSDate(dateObj).toLocaleString(DateTime.DATE_MED);
});
eleventyConfig.setLibrary("md", markdownLib);
eleventyConfig.setUseGitIgnore(false);

View File

@ -2,10 +2,10 @@
<div class="container-footer">
<div class="footer">
<span class="footer-text">
Built with Eleventy <br>
Running on Docker
Built with <a href="https://www.11ty.dev/" target="_blank">Eleventy</a><br>
Running on <a href="https://www.docker.com/" target="_blank">Docker</a>
<br>
Copyright (c) 2022 - Comprofix
Copyright <i class="fas fa-copyright"></i> - Comprofix
</span>
</div>
</div>

View File

@ -9,7 +9,7 @@
<ul class="menu>">
<li class="menu"><a href="/">Home</a></li>
<li class="menu"><a href="/disclaimer">Disclaimer</a></li>
<li class="menu"><a href="/contact">Contact Me</a></li>
<li class="menu"><a href="/blog">Blog</a></li>
<li class="menu">
<button id="modeSwitcher" class="container">
<div class="sun visible"></div>
@ -24,8 +24,7 @@
</div>
<div class="hero-image">
<div class="hero-text">
<h1 style="font-size:50px">Comprofix</h1>
<p style="font-size:24px">Computer Problems Fixed</p>
<h1 style="font-size:100px">Comprofix</h1>
</div>
</div>

View File

@ -6,7 +6,7 @@
{% block content %}
<h1>{{ title }}</h1>
<p><time>{{ page.date }} </time></p>
<p><time>{{ page.date | postDate }} </time></p>
<ul>
{% for tag in tags %}
<li>

View File

@ -4,18 +4,22 @@ title: Blog
eleventyExcludeFromCollections: true
---
<h1>{{ title }}</h1>
{% for post in collections.posts %}
{{ post.date | postDate }}
<ul>
{% for post in collections.posts %}
{# {% for post in collections.posts %} #}
<li>
<a href={{ post.url }}>{{ post.data.title }}</a>
</li>
{% endfor %}
{# {% endfor %} #}
</ul>
{% endfor %}

View File

@ -1,27 +0,0 @@
---
layout: layouts/post.njk
title: Welcome to the new Website.
description: We have a new website at last.
date: 2022-08-07
author: Matthew McKinnon
---
<!-- excerpt start -->
<center>
![](/assets/img/fireworks.jpg) {width=200}
</center>
After many months, we finally have a new website that works.
In the past, previous websites were built using Wordpress. Because I could go many months without creating a blog post, the website would get "forgotten". Because of this, the versions of Wordpress and plugins that were being used at the time would sometimes become "compromised", thus allowing attackers to gain entry to server and deface website etc.
<!-- excerpt end -->
So a new website back end was needed. After investigating and trying many different styles, I settled on using [Eleventy](https://11ty.dev){target="_blank"}.
Eleventy is a framework for building static websites. Once I built the code and templates. The website was born. All using pure HTML pages.
I will start rebuilding my old blog posts. As well as create some new and awesome content for you all to enjoy.

View File

@ -0,0 +1,26 @@
---
layout: layouts/post.njk
title: Reset and Restart
description: It's time to reset and restart the website.
date: 2024-09-15
author: Matthew McKinnon
---
<!-- excerpt start -->
<center>
![](https://t4.ftcdn.net/jpg/08/45/37/17/360_F_845371701_1efvAwbZQVOM2I3YslbPrpNf8408z56C.jpg){width=800}
</center>
It's time to reset the website and start building my blog again. I have had this domain for a number of years and it has always been used for my E-Mail.
But the website has been more of a play ground for experimenting and testing.
I am now hoping to get into the habit of writing more blog posts as I document my journey as I experiment with my HomeLab.
<!-- excerpt end -->

View File

@ -1,6 +1,6 @@
---
layout: layouts/homepage.njk
title: Computer Problems Fixed
title: Comprofix
eleventyExcludeFromCollections: true
---
@ -9,7 +9,7 @@ eleventyExcludeFromCollections: true
<div id="blog" class="post">
<h1>{{ post.data.title }}</h1>
{{ post.data.date }}
{{ post.data.date | postDate }}
<P>
{% excerpt post %}