Skip to content

Commit

Permalink
Fix embed titles and descriptions for blog posts
Browse files Browse the repository at this point in the history
  • Loading branch information
CorruptComputer committed Apr 26, 2022
1 parent 00f21c0 commit 1502603
Show file tree
Hide file tree
Showing 12 changed files with 110 additions and 65 deletions.
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
sitemap:
lastmod: 2021-03-09 09:00:00
lastmod: 2022-04-25 12:00:00
---

<div class="row">
Expand Down
23 changes: 0 additions & 23 deletions _includes/header.html

This file was deleted.

24 changes: 23 additions & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
<!DOCTYPE html>
<html lang="en">
{% include header.html %}
<head>
<meta name='description' content="My home on the Internet. Discussing programming, Linux, and other tech topics.">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nickolas Gupton</title>

<link rel="stylesheet" href="/assets/css/main.css">
<script src="/assets/js/main.js" defer></script>

<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="194x194" href="/favicons/favicon-194x194.png">
<link rel="icon" type="image/png" sizes="192x192" href="/favicons/android-chrome-192x192.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png">
<link rel="manifest" href="/favicons/site.webmanifest">
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg" color="#454d6a">
<link rel="shortcut icon" href="/favicons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Nickolas Gupton">
<meta name="application-name" content="Nickolas Gupton">
<meta name="msapplication-TileColor" content="#454d6a">
<meta name="msapplication-TileImage" content="/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="/favicons/browserconfig.xml">
<meta name="theme-color" content="#454d6a">
</head>

<body>
<h1 style="display:none;">Nickolas Gupton's Website and Blog</h1>
Expand Down
84 changes: 58 additions & 26 deletions _layouts/post.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,60 @@
---
layout: default
---
<div class="row">
<div class="box">
<h2>{{ page.title }}</h2><hr />
<!DOCTYPE html>
<html lang="en">
<head>
<meta name='description' content="{{ page.excerpt }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ page.title }} | Nickolas Gupton</title>

<link rel="stylesheet" href="/assets/css/main.css">
<script src="/assets/js/main.js" defer></script>

<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="194x194" href="/favicons/favicon-194x194.png">
<link rel="icon" type="image/png" sizes="192x192" href="/favicons/android-chrome-192x192.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png">
<link rel="manifest" href="/favicons/site.webmanifest">
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg" color="#454d6a">
<link rel="shortcut icon" href="/favicons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Nickolas Gupton">
<meta name="application-name" content="Nickolas Gupton">
<meta name="msapplication-TileColor" content="#454d6a">
<meta name="msapplication-TileImage" content="/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="/favicons/browserconfig.xml">
<meta name="theme-color" content="#454d6a">
</head>

{% if page.image %}
<img src="{{ page.image }}" alt="{{ page.title }}" class="blogImage">
{% endif %}

<div>
<p>{{ page.date | date: "%B %-d, %Y" }}</p>
<body>
<h1 style="display:none;">{{ page.title }}</h1>
<div class="container">
<div class="row">
<div class="box">
<h2>{{ page.title }}</h2><hr />

{% if page.image %}
<img src="{{ page.image }}" alt="{{ page.title }}" class="blogImage">
{% endif %}

<div>
<p>{{ page.date | date: "%B %-d, %Y" }}</p>

{{ content }}

<hr />
<script src="https://utteranc.es/client.js"
repo="CorruptComputer/home"
issue-term="url"
label="Blog Comments"
theme="github-dark"
crossorigin="anonymous"
async>
</script>
</div>
</div>
</div>
</div>

{% include navbar.html %}

{{ content }}

<hr />
<script src="https://utteranc.es/client.js"
repo="CorruptComputer/home"
issue-term="url"
label="Blog Comments"
theme="github-dark"
crossorigin="anonymous"
async>
</script>
</div>
</div>
</div>
</body>
</html>
3 changes: 2 additions & 1 deletion _posts/2017-03-31-discord-bot.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
layout: post
title: "Digital Ocean and a Discord Bot"
excerpt: "If anyone has ever used NadekoBot, you know that its great. But you know what could make it even better? Being 24/7."
date: 2017-03-31 10:30:00
lastmod: 2021-03-07 12:00:00
lastmod: 2022-04-25 12:00:00
image: /images/blog/2017-03-31-discord-bot/DigitalOceanDiscordBot.png
---

Expand Down
3 changes: 2 additions & 1 deletion _posts/2017-04-26-linux.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
layout: post
title: "My Adventures with Linux"
excerpt: "I love Linux, but there are so many different distributions. So how can I know if my current one is my favorite if I don't try them all?"
date: 2017-04-26 16:42:00
lastmod: 2021-03-10 12:00:00
lastmod: 2022-04-25 12:00:00
image: /images/blog/2017-04-26-linux/GNOMEdesktop.png
---

Expand Down
3 changes: 2 additions & 1 deletion _posts/2019-03-14-privacy-and-windows-10.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
layout: post
title: "Privacy and Windows 10"
excerpt: "Windows 10 has been a nightmare from a privacy perspective, however it doesn't have to be."
date: 2019-03-14 14:00:00
lastmod: 2021-03-07 12:00:00
lastmod: 2022-04-25 12:00:00
---

Windows 10 has been a nightmare from a privacy perspective, however it doesn't have to be. There are some group policies which can be set in order to limit the amount of data Microsoft collects and some to even outright disable it. There is also the issue of advertisements, in an operating system which you pay for (or any paid software for that matter) having advertisements in my opinion is unacceptable. Not only is this a possible breach of privacy, with most ads having trackers in order to deliver more "relevant" ads to you, but this also makes it less appealing to use and less user friendly.
Expand Down
3 changes: 2 additions & 1 deletion _posts/2020-05-21-ubuntu-20.04-bookstack.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
layout: post
title: "Installing BookStack on Ubuntu Server 20.04 with SSL"
excerpt: "BookStack is a free and open source Wiki software."
date: 2020-05-21 11:00:00
lastmod: 2021-03-07 12:00:00
lastmod: 2022-04-25 12:00:00
---

[BookStack](https://www.bookstackapp.com/) is a free and open source Wiki software. Its powerful markdown editor and ease of use has made it a popular alternative to software such as [DokuWiki](https://www.dokuwiki.org/DokuWiki) and [Wiki.js](https://wiki.js.org/). It is also very easy to setup and get running. In this article I will show you how to install and configure BookStack to work on Ubuntu Server 20.04 with an SSL certificate from LetsEncrypt.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
layout: post
title: "Removing Steam Games from Control Panel and Apps list on Windows"
excerpt: "It might just be me, but I find these to be absolutely useless and actually get in the way of actually finding the apps that I want to remove."
date: 2021-03-05 23:00:00
lastmod: 2021-03-07 12:00:00
lastmod: 2022-04-25 12:00:00
---

It might just be me, but I find these to be absolutely useless and actually get in the way of actually finding the apps that I want to remove.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
layout: post
title: "Bypass Windows login with Sticky Keys"
excerpt: "I have known about this vulnerability for years, but recently I've figured out that this exploit is not very well known."
date: 2021-05-10 15:00:00
lastmod: 2021-05-10 15:00:00
lastmod: 2022-04-25 12:00:00
---

I have known about this vulnerability for years, but recently I've figured out that this exploit is not very well known. In this blog post I'll show you how you can do it and what you can do to protect yourself from this.
Expand Down
11 changes: 6 additions & 5 deletions assets/js/main.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
'use strict';
document.addEventListener('DOMContentLoaded', function () {

if (window.location.hostname !== "nickolas.gupton.xyz"){
window.top.location.href = 'https://nickolas.gupton.xyz';
}
// Redirect from prod Cloudflare Pages domain, excludes pages test deployments and local testing
if (window.location.hostname === "nickolasgupton.pages.dev"){
window.top.location.href = 'https://nickolas.gupton.xyz';
}

document.addEventListener('DOMContentLoaded', function () {
let homeButton = document.querySelector('#homeButton');
let blogButton = document.querySelector('#blogButton');
let currentURL = window.location.toString();
Expand Down Expand Up @@ -33,4 +34,4 @@ document.addEventListener('DOMContentLoaded', function () {
}
});

}, false);
}, false);
13 changes: 10 additions & 3 deletions blog/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
layout: default
sitemap:
lastmod: 2021-03-09 09:00:00
lastmod: 2022-04-25 12:00:00
---

{% if paginator.page == 1 %}
Expand All @@ -10,7 +10,14 @@
<h2>About my blog</h2><hr />
<p>
I mostly look at programming, Linux, and other tech topics.
Thanks for checking it out!
Thanks for checking out my internet ramblings.
</p>
</div>
<div class="box">
<h2>Comments</h2><hr />
<p>
This blog has comments powered by <a href="https://github.com/utterance/utterances" target="_blank" rel="noopener">Utterances</a>.
Utterances uses GitHub Issues as its backend storage for the comments, so in order to contribute you'll need to log in with your GitHub account.
</p>
</div>
</div>
Expand All @@ -22,7 +29,7 @@ <h2>About my blog</h2><hr />
<div class="row">
<div class="box">
<a href="{{ post.url }}"><h2>{{ post.date | date: "%B %-d, %Y" }}: {{ post.title }}</h2></a><hr />
{{ post.excerpt }}
<p>{{ post.excerpt }}</p>
<a href="{{ post.url }}"><button class="blogBtn">Read More</button></a>
</div>
</div>
Expand Down

0 comments on commit 1502603

Please sign in to comment.