Merge pull request #25 from Mastermindzh/feature/various-issues

Feature/various issues
This commit is contained in:
Rick van Lieshout 2023-10-29 15:54:59 +01:00 committed by GitHub
commit 82115dd07a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 63 additions and 44 deletions

View File

@ -2,6 +2,18 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### [1.3.1](https://github.com/mastermindzh/rickvanlieshout.com/compare/v1.3.0...v1.3.1) (2023-10-29)
### Bug Fixes
* fixed tags and categories in several blog posts ([7019f34](https://github.com/mastermindzh/rickvanlieshout.com/commits/7019f340050c04eed6065c4ddd4582d6b2d22b9b))
* now setting og:url correctly as well as the canonical url ([e065f16](https://github.com/mastermindzh/rickvanlieshout.com/commits/e065f16fb505eb8f9e5acef6f92c5a016e276ebc))
* set current url tags in both ssr and browser space ([1c4c9d0](https://github.com/mastermindzh/rickvanlieshout.com/commits/1c4c9d058a7382ebe52dd1b188b22ca8d7a185c3))
* several fixes to improve ahrefs site score ([8245e1f](https://github.com/mastermindzh/rickvanlieshout.com/commits/8245e1f0d8854cd6a727a8b837ee3259ee040d48))
* upgrade gatsby from 5.12.1 to 5.12.3 ([043d08e](https://github.com/mastermindzh/rickvanlieshout.com/commits/043d08e58f9962688bd615b8e8d535e4111e7aa2))
* upgrade gatsby from 5.12.3 to 5.12.4 ([f13f40d](https://github.com/mastermindzh/rickvanlieshout.com/commits/f13f40df35cc0230ddcf7766a7b2e73477696439))
## [1.3.0](https://github.com/mastermindzh/rickvanlieshout.com/compare/v1.2.3...v1.3.0) (2023-09-23) ## [1.3.0](https://github.com/mastermindzh/rickvanlieshout.com/compare/v1.2.3...v1.3.0) (2023-09-23)

View File

@ -1,6 +1,6 @@
# Rickvanlieshout.com # Rickvanlieshout.com
This is the repository for my personal blog/website [rickvanlieshout.com](https://rickvanlieshout.com). This is the repository for my personal blog/website [rickvanlieshout.com](https://www.rickvanlieshout.com).
[![Build Status](https://ci.mastermindzh.tech/api/badges/Mastermindzh/rickvanlieshout.com/status.svg)](https://ci.mastermindzh.tech/Mastermindzh/rickvanlieshout.com) [![Build Status](https://ci.mastermindzh.tech/api/badges/Mastermindzh/rickvanlieshout.com/status.svg)](https://ci.mastermindzh.tech/Mastermindzh/rickvanlieshout.com)

View File

@ -46,7 +46,7 @@
"author": { "author": {
"name": "Rick van Lieshout", "name": "Rick van Lieshout",
"photo": "/content/me.png", "photo": "/content/me.png",
"bio": "I'm a passionate software architect that bifurcates his love between great software development and leading others to learn and adopt new things.", "bio": "I'm a passionate CTO that bifurcates his love between great software development and leading others in their continuous improvement journeys",
"contacts": { "contacts": {
"email": "info@rickvanlieshout.com", "email": "info@rickvanlieshout.com",
"github": "mastermindzh", "github": "mastermindzh",

View File

@ -14,7 +14,7 @@ socialImage: "./media/improvising.jpg"
So today I finally received the required parts to finish up my Raspberry pi cluster and I was **extremely** excited! To share this excitement with you lot here's a picture of all the parts I'll be using: So today I finally received the required parts to finish up my Raspberry pi cluster and I was **extremely** excited! To share this excitement with you lot here's a picture of all the parts I'll be using:
![picture of all the parts spread on the mat](./media/pi_overview_full.JPG "all the bits!") ![picture of all the parts spread on the mat](./media/pi_overview_full.jpg "all the bits!")
I began by building the Raspberry pi "tower", sadly I forgot to take a picture with the DSLR so I only have this one cell image to show you guys: I began by building the Raspberry pi "tower", sadly I forgot to take a picture with the DSLR so I only have this one cell image to show you guys:

View File

@ -9,7 +9,7 @@ tags:
- "pi" - "pi"
description: "Today's blog post will be about expanding the cluster with more nodes." description: "Today's blog post will be about expanding the cluster with more nodes."
disqusId: "6" disqusId: "6"
socialImage: "./media/pidark_full.JPG" socialImage: "./media/pidark.jpg"
--- ---
In today's post we'll have a look at expanding the cluster with more nodes! We will have a look at how to clone them and how we can set up a universal login using ssh keys. In today's post we'll have a look at expanding the cluster with more nodes! We will have a look at how to clone them and how we can set up a universal login using ssh keys.
@ -40,7 +40,7 @@ sudo nano /etc/network/interfaces
After setting up all 4 pi's and plugging it all in you should see all 4 led's light up on the pi's. If this is not the case you might've forgotten to change either the ip address or the hostname. (which will lead to a conflict resulting in one of them not having internet access). Mine now looks like this (note the dramatic night picture taken at 10 past 12 am): After setting up all 4 pi's and plugging it all in you should see all 4 led's light up on the pi's. If this is not the case you might've forgotten to change either the ip address or the hostname. (which will lead to a conflict resulting in one of them not having internet access). Mine now looks like this (note the dramatic night picture taken at 10 past 12 am):
![picture of 4 Raspberry pi's stacked on a network switch serving as a cluster](./media/pidark_full.JPG "It's not quite RGB but it's beautiful!") ![picture of 4 Raspberry pi's stacked on a network switch serving as a cluster](./media/pidark.jpg "It's not quite RGB but it's beautiful!")
## Logging in to the nodes with ssh keys ## Logging in to the nodes with ssh keys

View File

@ -8,7 +8,7 @@ tags:
- "lsi9211" - "lsi9211"
- "raid card" - "raid card"
- "storage" - "storage"
- "sas2000" - "SAS2000"
- "it-mode" - "it-mode"
description: "Flashing the LSI-9211 used to be way more difficult, luckily the EFI shell makes this task a lot simpler!" description: "Flashing the LSI-9211 used to be way more difficult, luckily the EFI shell makes this task a lot simpler!"
socialImage: ./media/flash-result.jpg socialImage: ./media/flash-result.jpg

View File

@ -1,3 +0,0 @@
import "./src/assets/scss/main.scss";
import "./src/assets/scss/prism/github.scss";
import "./src/assets/scss/prism/prism-tomorrow.scss";

19
gatsby-browser.tsx Normal file
View File

@ -0,0 +1,19 @@
import "./src/assets/scss/main.scss";
import "./src/assets/scss/prism/github.scss";
import "./src/assets/scss/prism/prism-tomorrow.scss";
export const onRouteUpdate = ({ location }: { location: { pathname: string } }) => {
const elements = document.querySelectorAll("[data-url]");
const currentUrl = `https://www.rickvanlieshout.com${location.pathname ?? ""}`;
const setAttributeIfAvailable = (element: Element, elementIdentifier: string) => {
if (element.hasAttribute(elementIdentifier)) {
element.setAttribute(elementIdentifier, currentUrl);
}
};
elements.forEach((element) => {
setAttributeIfAvailable(element, "href");
setAttributeIfAvailable(element, "content");
});
};

View File

@ -164,13 +164,6 @@ export default {
start_url: "/", start_url: "/",
}, },
}, },
{
resolve: "gatsby-plugin-react-helmet-canonical-urls",
options: {
siteUrl: config.url,
stripQueryString: true,
},
},
// remove the old service worker if it is available. // remove the old service worker if it is available.
"gatsby-plugin-remove-serviceworker", "gatsby-plugin-remove-serviceworker",
"gatsby-plugin-image", "gatsby-plugin-image",

View File

@ -18,7 +18,19 @@ const setColorTheme = `
} }
})(); })();
`; `;
export const onRenderBody = ({ setPreBodyComponents }: RenderBodyArgs) => { export const onRenderBody = ({
setPreBodyComponents,
setHeadComponents,
pathname,
}: RenderBodyArgs) => {
const currentUrl = `https://www.rickvanlieshout.com${pathname}`;
setHeadComponents([
<meta data-url="currentUrl" key="og:url" property="og:url" content={currentUrl} />,
<link data-url="currentUrl" key="canonical" rel="canonical" href={currentUrl} />,
<meta data-url="currentUrl" property="test:rick" key="test:rick" content={currentUrl} />,
]);
setPreBodyComponents([ setPreBodyComponents([
React.createElement("script", { React.createElement("script", {
key: "theme", key: "theme",

View File

@ -1,5 +1,5 @@
export default [ export default [
{ label: "Articles", path: "/" }, { label: "Articles", path: "/" },
{ label: "About Me", path: "/pages/about" }, { label: "About Me", path: "/pages/about/" },
{ label: "Contact Me", path: "/pages/contacts" }, { label: "Contact Me", path: "/pages/contacts/" },
]; ];

17
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "rickvanlieshout-com", "name": "rickvanlieshout-com",
"version": "1.3.0", "version": "1.3.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "rickvanlieshout-com", "name": "rickvanlieshout-com",
"version": "1.3.0", "version": "1.3.1",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.4.2", "@fortawesome/fontawesome-svg-core": "^6.4.2",
@ -23,7 +23,6 @@
"gatsby-plugin-manifest": "^5.12.0", "gatsby-plugin-manifest": "^5.12.0",
"gatsby-plugin-optimize-svgs": "^1.0.5", "gatsby-plugin-optimize-svgs": "^1.0.5",
"gatsby-plugin-react-helmet": "^6.12.0", "gatsby-plugin-react-helmet": "^6.12.0",
"gatsby-plugin-react-helmet-canonical-urls": "^1.4.0",
"gatsby-plugin-remove-serviceworker": "^1.0.0", "gatsby-plugin-remove-serviceworker": "^1.0.0",
"gatsby-plugin-robots-txt": "^1.8.0", "gatsby-plugin-robots-txt": "^1.8.0",
"gatsby-plugin-sass": "^6.12.0", "gatsby-plugin-sass": "^6.12.0",
@ -16060,18 +16059,6 @@
"react-helmet": "^5.1.3 || ^6.0.0" "react-helmet": "^5.1.3 || ^6.0.0"
} }
}, },
"node_modules/gatsby-plugin-react-helmet-canonical-urls": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/gatsby-plugin-react-helmet-canonical-urls/-/gatsby-plugin-react-helmet-canonical-urls-1.4.0.tgz",
"integrity": "sha512-5g2eqFNh8GSCTvL25sNm84IJ6G79qKHSnOa9druxBj6x5Iw3EujZMv6I4nGMlW5EZlaSf9D5QHNGypUW6idPTg==",
"dependencies": {
"@babel/runtime": "^7.3.1"
},
"peerDependencies": {
"gatsby-plugin-react-helmet": "*",
"react-helmet": "*"
}
},
"node_modules/gatsby-plugin-remove-serviceworker": { "node_modules/gatsby-plugin-remove-serviceworker": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/gatsby-plugin-remove-serviceworker/-/gatsby-plugin-remove-serviceworker-1.0.0.tgz", "resolved": "https://registry.npmjs.org/gatsby-plugin-remove-serviceworker/-/gatsby-plugin-remove-serviceworker-1.0.0.tgz",

View File

@ -1,6 +1,6 @@
{ {
"name": "rickvanlieshout-com", "name": "rickvanlieshout-com",
"version": "1.3.0", "version": "1.3.1",
"description": "My personal blog / website", "description": "My personal blog / website",
"keywords": [ "keywords": [
"gatsby", "gatsby",
@ -63,7 +63,6 @@
"gatsby-plugin-manifest": "^5.12.0", "gatsby-plugin-manifest": "^5.12.0",
"gatsby-plugin-optimize-svgs": "^1.0.5", "gatsby-plugin-optimize-svgs": "^1.0.5",
"gatsby-plugin-react-helmet": "^6.12.0", "gatsby-plugin-react-helmet": "^6.12.0",
"gatsby-plugin-react-helmet-canonical-urls": "^1.4.0",
"gatsby-plugin-remove-serviceworker": "^1.0.0", "gatsby-plugin-remove-serviceworker": "^1.0.0",
"gatsby-plugin-robots-txt": "^1.8.0", "gatsby-plugin-robots-txt": "^1.8.0",
"gatsby-plugin-sass": "^6.12.0", "gatsby-plugin-sass": "^6.12.0",

View File

@ -1,9 +1,9 @@
import React from "react"; import React from "react";
import Helmet from "react-helmet"; import Helmet from "react-helmet";
import { useSiteMetadata } from "@/hooks";
import { CookieBar } from "../Cookiebar/CookieBar"; import { CookieBar } from "../Cookiebar/CookieBar";
import * as styles from "./Layout.module.scss"; import * as styles from "./Layout.module.scss";
import { useSiteMetadata } from "@/hooks";
interface Props { interface Props {
title: string; title: string;
@ -35,7 +35,7 @@ const Layout: React.FC<Props> = ({
<meta property="og:description" content={description} /> <meta property="og:description" content={description} />
<meta property="og:site_name" content={title} /> <meta property="og:site_name" content={title} />
<meta property="og:image" content={metaImageUrl} /> <meta property="og:image" content={metaImageUrl} />
{slug && <meta property="og:url" content={`${url}${slug}`} />} <meta property="og:title" content={title} />
<meta name="twitter:card" content="summary" /> <meta name="twitter:card" content="summary" />
<meta name="twitter:title" content={title} /> <meta name="twitter:title" content={title} />
<meta name="twitter:description" content={description} /> <meta name="twitter:description" content={description} />

View File

@ -9,7 +9,7 @@ const Author = () => {
<div className={styles.author}> <div className={styles.author}>
<p className={styles.bio}> <p className={styles.bio}>
Written by:{" "} Written by:{" "}
<a href="/pages/about"> <a href="/pages/about/">
<strong>{author.name}</strong> <strong>{author.name}</strong>
</a> </a>
{typeof window !== "undefined" ? ( {typeof window !== "undefined" ? (

View File

@ -6,7 +6,7 @@ exports[`Author renders correctly 1`] = `
Written by: Written by:
<a <a
href="/pages/about" href="/pages/about/"
> >
<strong> <strong>
Rick van Lieshout Rick van Lieshout

View File

@ -165,7 +165,7 @@ exports[`Post renders correctly 1`] = `
Written by: Written by:
<a <a
href="/pages/about" href="/pages/about/"
> >
<strong> <strong>
Rick van Lieshout Rick van Lieshout

View File

@ -166,7 +166,7 @@ exports[`PostTemplate renders correctly 1`] = `
Written by: Written by:
<a <a
href="/pages/about" href="/pages/about/"
> >
<strong> <strong>
Rick van Lieshout Rick van Lieshout

View File

@ -55,10 +55,10 @@ RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301] RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301]
RewriteCond %{HTTP_HOST} ^rickvanlieshout.com [NC] RewriteCond %{HTTP_HOST} ^rickvanlieshout.com [NC]
RewriteRule ^(.*)$ http://www.rickvanlieshout.com/$1 [L,R=301] RewriteRule ^(.*)$ https://www.rickvanlieshout.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^mastermindzh.com [NC] RewriteCond %{HTTP_HOST} ^mastermindzh.com [NC]
RewriteRule ^(.*)$ http://www.mastermindzh.com/$1 [L,R=301] RewriteRule ^(.*)$ https://www.mastermindzh.com/$1 [L,R=301]
# Optional: explicitly enable per-directory rewrites in the .htaccess context. # Optional: explicitly enable per-directory rewrites in the .htaccess context.