Skip to content

Commit

Permalink
Refactor file paths and update website description
Browse files Browse the repository at this point in the history
  • Loading branch information
groveld committed Sep 23, 2024
1 parent 930b930 commit eaf8333
Show file tree
Hide file tree
Showing 27 changed files with 411 additions and 337 deletions.
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
github: ['groveld']
custom: ['https://www.paypal.me/groveld']
github: ["groveld"]
custom: ["https://www.paypal.me/groveld"]
28 changes: 14 additions & 14 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ on:
branches:
- main
paths-ignore:
- '.github/**'
- '_drafts/**'
- '.gitattributes'
- '.gitignore'
- 'Gemfile'
- 'LICENSE'
- 'README.md'
- ".github/**"
- "_drafts/**"
- ".gitattributes"
- ".gitignore"
- "Gemfile"
- "LICENSE"
- "README.md"
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
Expand All @@ -39,7 +39,7 @@ jobs:
with:
repository: groveld/jekyll-theme
ref: main

- name: Checkout Content
uses: actions/checkout@v4
with:
Expand All @@ -48,13 +48,13 @@ jobs:

- name: Merge Content with Theme
run: |
rm -rf ${GITHUB_WORKSPACE}/_posts/
rsync -av --exclude ".git*" --exclude "LICENSE" --exclude "README.md" ${GITHUB_WORKSPACE}/.content/ ${GITHUB_WORKSPACE}/
rm -rf "${GITHUB_WORKSPACE}/_posts/"
rsync -av --exclude ".git*" --exclude "LICENSE" --exclude "README.md" "${GITHUB_WORKSPACE}/.content/" "${GITHUB_WORKSPACE}/"
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3' # Not needed with a .ruby-version file
ruby-version: "3.3" # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems

Expand All @@ -75,10 +75,10 @@ jobs:
- name: Install PurgeCSS and remove unused CSS
run: |
npm i -g purgecss
purgecss --css ${GITHUB_WORKSPACE}/_site/**/*.css --content ${GITHUB_WORKSPACE}/_site/**/*.html
purgecss --css "${GITHUB_WORKSPACE}/_site/**/*.css" --content "${GITHUB_WORKSPACE}/_site/**/*.html"
- name: Validate Jekyll
run: bundle exec htmlproofer ${GITHUB_WORKSPACE}/_site/ --checks Images,Scripts,Favicon --disable-external
run: bundle exec htmlproofer "${GITHUB_WORKSPACE}/_site/" --checks Images,Scripts,Favicon --disable-external

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</h1>

<h4 align="center">
This is the personal website of Martin Groeneveld
This is the personal site of Martin Groeneveld
</h4>

<p align="center">
Expand Down Expand Up @@ -63,10 +63,10 @@ description : "A very descriptive description here"

The following directories and their contents are Copyright Martin Groeneveld. You may not reuse anything therein without my permission:

- _data
- _drafts
- _pages
- _posts
- \_data
- \_drafts
- \_pages
- \_posts
- assets

All other directories and files are ISC Licensed. Feel free to use the HTML and CSS as you please. If you do use them, a link back to https://github.com/groveld/groveld.github.io would be appreciated.
36 changes: 18 additions & 18 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
---
locale: 'en'
timezone: 'Europe/Amsterdam'
url: 'https://www.groveld.com'
permalink: '/articles/:title'
locale: "en"
timezone: "Europe/Amsterdam"
url: "https://www.groveld.com"
permalink: "/articles/:title"

# Progressive Web App Settings
pwa_title : 'Groveld'
pwa_themecolor : '#1e88e5'
pwa_backgroundcolor : '#1e88e5'
pwa_title: "Groveld"
pwa_themecolor: "#1e88e5"
pwa_backgroundcolor: "#1e88e5"

serviceworker : true
google_analytics : 'UA-134156954-1'
serviceworker: true
google_analytics: "UA-134156954-1"
# disqus_name : 'groveld'

# Custom Jekyll Configuration
title : 'Martin Groeneveld'
tagline : 'The personal website of Martin Groeneveld'
description : 'The personal website of Martin Groeneveld'
author : 'Martin Groeneveld'
email : 'martin@groveld.com'

phone : '+31612345678'
address : 'Streetname 123<br>Zipcode City<br>Country'
legal : '<a href="/terms">Terms</a> &bull; <a href="/privacy">Privacy</a>'
title: "Martin Groeneveld"
tagline: "The personal site of Martin Groeneveld"
description: "The personal site of Martin Groeneveld"
author: "Martin Groeneveld"
email: "martin@groveld.com"

phone: "+31612345678"
address: "Streetname 123<br>Zipcode City<br>Country"
legal: '<a href="/terms">Terms</a> &bull; <a href="/privacy">Privacy</a>'

# Core Jekyll Configuration
sass:
Expand Down
1 change: 0 additions & 1 deletion _data/.gitkeep
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

16 changes: 8 additions & 8 deletions _drafts/2019-02-28-edgerouter-ziggo-config.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
layout : post
author : Martin Groeneveld
title : "EdgeRouter 4 Setup Ziggo Dual WAN"
description : "EdgeRouter 4 Setup Ziggo Dual WAN"
tags : [Ubiquiti, EdgeRouter, EdgeMAX, Ziggo, Setup]
comments : true
layout: post
author: Martin Groeneveld
title: "EdgeRouter 4 Setup Ziggo Dual WAN"
description: "EdgeRouter 4 Setup Ziggo Dual WAN"
tags: [Ubiquiti, EdgeRouter, EdgeMAX, Ziggo, Setup]
comments: true
---

```math
Expand All @@ -16,14 +16,14 @@ comments : true
```

```katex
\displaystyle
\displaystyle
\frac{1}{
\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{
\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {
1+\frac{e^{-6\pi}}
{1+\frac{e^{-8\pi}}
{1+\cdots} }
}
}
}
```

Expand Down
17 changes: 8 additions & 9 deletions _drafts/2019-05-20-self-signed-certificate-authority.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ openssl req -x509 -new -nodes -sha256 -key groveldCA.key -subj "/C=NL/O=Groveld/

#### Verify the certificate's content

```
```bash
openssl x509 -in groveldCA.crt -text -noout
```

Expand Down Expand Up @@ -53,17 +53,17 @@ If you generate the csr in this way, openssl will ask you questions about the ce
openssl req -new -sha256 -key home.groveld.com.key -out home.groveld.com.csr
```

#### Method B (One Liner)
#### Method B (one-liner)

This method generates the same output as Method A but it's suitable for use in your automation :) .

```
```bash
openssl req -new -sha256 -key home.groveld.com.key -subj "/C=NL/O=Groveld/CN=home.groveld.com" -out home.groveld.com.csr
```

If you need to pass additional config you can use the `-config` parameter, here for example I want to add alternative names to my certificate.

```
```bash
openssl req -new -sha256 \
-key home.groveld.com.key \
-subj "/C=NL/O=Groveld/CN=home.groveld.com" \
Expand All @@ -73,24 +73,23 @@ openssl req -new -sha256 \
-out home.groveld.com.csr
```


### Verify the csr's content

```
```bash
openssl req -in home.groveld.com.csr -noout -text
```

## Generate the certificate using the `home.groveld.com` csr and key along with the CA Root key

```
```bash
openssl x509 -req -sha256 -in home.groveld.com.csr -CA groveldCA.crt -CAkey groveldCA.key -CAcreateserial -out home.groveld.com.crt -days 365
```

### Verify the certificate's content

```
```bash
openssl x509 -in home.groveld.com.crt -text -noout
```

[DO REFERENCE](https://www.digitalocean.com/community/tutorials/how-to-set-up-an-ikev2-vpn-server-with-strongswan-on-ubuntu-18-04-2)
https://serverfault.com/questions/536092/strongswan-ikev2-windows-7-agile-vpn-what-is-causing-error-13801
https://serverfault.com/questions/536092/strongswan-ikev2-windows-7-agile-vpn-what-is-causing-error-13801
Empty file.
62 changes: 32 additions & 30 deletions _drafts/2020-08-21-deploy-jekyll-with-travis.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
layout : post
author : Martin Groeneveld
email : martin@groveld.com
title : Deploying a Jekyll site on GitHub using Travis CI
description : Using Travis CI to deploy a Jekyll based site to Github Pages
tags : [jekyll, travis-ci, github]
layout: post
author: Martin Groeneveld
email: martin@groveld.com
title: Deploying a Jekyll site on GitHub using Travis CI
description: Using Travis CI to deploy a Jekyll based site to Github Pages
tags: [jekyll, travis-ci, github]
---

Since our company’s inception, we at Savas Labs have used Jekyll to build our company website and GitHub Pages to host it with great success. Jekyll is a powerful tool out of the box, and it’s hard to imagine a simpler hosting strategy than GitHub Pages, which only requires a specifically named branch and a single settings update to get your site live for free. Although we often use Drupal to build complex, data-heavy systems that need to have a simple workflow for site admins, for our own site we recognized that Jekyll was a better tool for our workflow that would mitigate security risks, eliminate site hosting costs, and reduce complexity since there’s no need for a database back-end.
Since our company’s inception, we at Savas Labs have used Jekyll to build our company site and GitHub Pages to host it with great success. Jekyll is a powerful tool out of the box, and it’s hard to imagine a simpler hosting strategy than GitHub Pages, which only requires a specifically named branch and a single settings update to get your site live for free. Although we often use Drupal to build complex, data-heavy systems that need to have a simple workflow for site admins, for our own site we recognized that Jekyll was a better tool for our workflow that would mitigate security risks, eliminate site hosting costs, and reduce complexity since there’s no need for a database backend.

One well-known limitation of this workflow: any Jekyll plugins not whitelisted by GitHub Pages will be disabled when GitHub Pages builds the site, since jekyll build is run with the --safe tag. We recently wanted to start using the Jekyll Picture Tag plugin (read about why), and the incredibly crucial Jemoji plugin :joy_cat:, so we needed to find a way to build our site before pushing it to GitHub Pages for deployment. To complicate matters a bit more, we recently starting building our site with gulp, which introduced another layer of dependencies to the mix.

Expand All @@ -26,16 +26,16 @@ Now, we want to build our site before it gets to GitHub Pages to ensure our Jeky

We created a new default branch so the master branch can be cleared out and used by Travis.
When this new branch is updated (i.e. a pull request is merged), Travis builds the site.
Using a GitHub token for authorization, Travis commits the _site directory to the master branch, then pushes the master branch.
Using a GitHub token for authorization, Travis commits the \_site directory to the master branch, then pushes the master branch.
This triggers GitHub Pages to deploy our pre-built site.
Diagram of new deployment workflow
New deployment workflow

## Create a new default branch

We created a new branch off master called source and set it to the default branch on GitHub. source contains what the master branch used to — the Jekyll config file(s), HTML files and partials, data files, styles and JS, etc. Each time the deploy process is run, Travis deletes all the files on the master branch, then commits the entire compiled _site directory. So, the master branch only contains the compiled site, which is deployed by GitHub Pages.
We created a new branch off master called source and set it to the default branch on GitHub. source contains what the master branch used to — the Jekyll config file(s), HTML files and partials, data files, styles and JS, etc. Each time the deploy process is run, Travis deletes all the files on the master branch, then commits the entire compiled \_site directory. So, the master branch only contains the compiled site, which is deployed by GitHub Pages.

Why delete all files on master before committing the _site directory? This ensures that all changes (including deletions) are captured in each deployment.
Why delete all files on master before committing the \_site directory? This ensures that all changes (including deletions) are captured in each deployment.

## Set up a GitHub token for Travis

Expand All @@ -50,10 +50,11 @@ $ travis encrypt GH_EMAIL=<email> --add env.global
This adds encrypted versions of these sensitive items to .travis.yml:

env:
global:
- secure: [big long encrypted string...]
- secure: [...and another]
With that, we can use the GH_TOKEN and GH_EMAIL variables in our deployment script. See Travis’ docs for more inforamtion.
global:

- secure: [big long encrypted string...]
- secure: [...and another]
With that, we can use the GH_TOKEN and GH_EMAIL variables in our deployment script. See Travis’ docs for more inforamtion.

## Configure deployment

Expand All @@ -62,20 +63,21 @@ Next we added the following to our .travis.yml file:
# Keep Travis from testing `master` branch

branches:
except:
- master
except:

- master

# Deployment config

deploy:
provider: script
script: "./_scripts/build.sh"
skip_cleanup: false
on:
branch: source
We don’t want Travis running the test script on the master branch anymore since it only contains the compiled site, and we only want Travis to run the deployment script on the source branch. We’re also telling Travis which script to run on deployment, and to destroy the site after the test script is run with our _config.test.yml file so the deployment script can rebuild the site with our default _config.yml file. Check out this revision of the full .travis.yml file here.
provider: script
script: "./\_scripts/build.sh"
skip_cleanup: false
on:
branch: source
We don’t want Travis running the test script on the master branch anymore since it only contains the compiled site, and we only want Travis to run the deployment script on the source branch. We’re also telling Travis which script to run on deployment, and to destroy the site after the test script is run with our \_config.test.yml file so the deployment script can rebuild the site with our default \_config.yml file. Check out this revision of the full .travis.yml file here.

That revision of .travis.yml worked for us when we were using jekyll build to compile the site, but things got trickier when we started using gulp. We had to set the proper versions of npm and node.js and ensure that our ruby gems were installed properly. Here’s the full Travis config we needed to get things running with gulp:
That revision of .travis.yml worked for us when we were using jekyll build to compile the site, but things got trickier when we started using gulp. We had to set the proper versions of npm and Node.js and ensure that our ruby gems were installed properly. Here’s the full Travis config we needed to get things running with gulp:

# .travis.yml

Expand All @@ -86,9 +88,9 @@ script:
- ./_scripts/run-tests.sh
branches:
except:
- master
- master
node_js:
- '6.1'
- "6.1"
before_install:
- if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi
- rvm install 2.1
Expand All @@ -98,9 +100,9 @@ before_install:
- bundle check || bundle install
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
- secure: [stuff]
- secure: [more stuff]
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
- secure: [stuff]
- secure: [more stuff]
deploy:
provider: script
script: "./_scripts/build.sh"
Expand Down Expand Up @@ -155,13 +157,13 @@ git push --quiet origin `master` > /dev/null 2>&1
Some important notes:

Make sure the script file is executable!
The last line ensures that our encrypted token won’t end up in git logs.
The last line ensures that our encrypted token won’t end up in Git logs.

## Deployment and debugging

Merging this code into source was the easiest way for us to test if our new process worked — scary, right? Fortunately, if the build script failed (and it did several times until we could get the npm and node versions correct and the ruby gems installing properly) nothing got pushed to master so nothing was deployed, meaning no downtime on our site.

We also used Teleconsole to debug from inside the Travis environment. To do this, we commented out the git push line and added the following to build.sh:
We also used Teleconsole to debug from inside the Travis environment. To do this, we commented out the Git push line and added the following to build.sh:

curl https://www.teleconsole.com/get.sh | sh
teleconsole
Expand Down
12 changes: 6 additions & 6 deletions _pages/about.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
layout : page
permalink : /about
title : About the author of this blog
description : About the author of this blog
layout: page
permalink: /about
title: About the author of this blog
description: About the author of this blog
---

Hello! My name is Martin Groeneveld. From being a passionate hacker, a creative maker, a relentless tinkerer, to an ardent learner, I've journeyed across the dynamic landscape of technology since 2006, and I'm not stopping anytime soon.
Expand All @@ -15,8 +15,8 @@ Although I enjoy the complexities and challenges of my full-time job, I am alway

Hope to hear from you soon!

## About This Website
## About This Site

Rather than relying on a complex content management system to serve content, this website is built with [Jekyll](https://jekyllrb.com/), a “simple, blog aware, static site generator” written in [Ruby](https://www.ruby-lang.org/en/). As a purely static site, no server-side processing is necessary after the site is initially built.
Rather than relying on a complex content management system to serve content, this site is built with [Jekyll](https://jekyllrb.com/), a “simple, blog aware, static site generator” written in [Ruby](https://www.ruby-lang.org/en/). As a purely static site, no server-side processing is necessary after the site is initially built.

Much of the content is formatted with [Markdown](https://en.wikipedia.org/wiki/Markdown), which gets converted into HTML when the site is built. This makes it easy to add content to the site without any HTML experience, while avoiding the complexity of using a CMS with a WYSIWYG page editor.
Loading

0 comments on commit eaf8333

Please sign in to comment.