Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/hugo-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Hugo checks

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
env:
PYTHONDONTWRITEBYTECODE: '1'
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
submodules: true
- uses: peaceiris/actions-hugo@d1c81a15d4e6dca7086a17b9c2565cb70fd576bf # v3
with:
hugo-version: '0.169.0'
extended: true
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '24'
cache: npm
cache-dependency-path: scripts/ci/package-lock.json
- name: Build site
id: build
run: hugo --minify --destination "$RUNNER_TEMP/hugo-site"
- name: Install browser checks
id: dependencies
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
env:
PLAYWRIGHT_SKIP_BROWSER_GC: '1'
run: |
npm ci --prefix scripts/ci
cd scripts/ci
npx playwright install --with-deps chromium
- name: Test artifact checks
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
run: python3 -m unittest discover -s scripts -p 'test_*.py'
- name: Validate site artifact
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
run: python3 scripts/check_site.py "$RUNNER_TEMP/hugo-site"
- name: Check internal links
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
run: python3 scripts/check_links.py "$RUNNER_TEMP/hugo-site"
- name: Test browser checks
if: ${{ !cancelled() && steps.build.outcome == 'success' && steps.dependencies.outcome == 'success' }}
run: npm test --prefix scripts/ci
- name: Check accessibility
if: ${{ !cancelled() && steps.build.outcome == 'success' && steps.dependencies.outcome == 'success' }}
run: node scripts/ci/accessibility.mjs "$RUNNER_TEMP/hugo-site"
- name: Generate Lighthouse reports
id: lighthouse
if: ${{ !cancelled() && steps.build.outcome == 'success' && steps.dependencies.outcome == 'success' }}
run: node scripts/ci/lighthouse.mjs "$RUNNER_TEMP/hugo-site" "$RUNNER_TEMP/lighthouse-reports"
- name: Upload Lighthouse reports
if: ${{ !cancelled() && steps.lighthouse.outcome != 'skipped' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: lighthouse-local-reports
path: ${{ runner.temp }}/lighthouse-reports
if-no-files-found: error
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/resources/_gen/
/scripts/__pycache__/
/scripts/ci/node_modules/
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
path = themes/congo
url = https://github.com/jpanther/congo.git
branch = stable
[submodule "themes/mainroad"]
path = themes/mainroad
url = https://github.com/vimux/mainroad
[submodule "themes/-force"]
path = themes/-force
url = https://github.com/vimux/mainroad
[submodule "themes/papermod"]
path = themes/papermod
url = https://github.com/adityatelange/hugo-PaperMod.git
2 changes: 1 addition & 1 deletion archetypes/default.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "{{ replace .TranslationBaseName '-' ' ' | title }}"
description: ""
description: "" # Add a concise description for search and social previews.
date: "{{ .Date }}"
categories:
- ""
Expand Down
30 changes: 30 additions & 0 deletions assets/css/extended/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.post-entry .entry-cover img {
max-height: 150px;
width: auto;
max-width: 100%;
object-fit: contain;
}

.post-content pre { overflow-x: auto; }
.md-content pre code { overflow-x: visible; }
.md-content pre code span[style*="color:#f92672"] { color: #ff719a !important; }
.post-tags a { color: var(--primary); }
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
a:focus-visible, button:focus-visible {
outline: 3px solid var(--primary);
outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { scroll-behavior: auto !important; }
}
70 changes: 70 additions & 0 deletions assets/js/fastsearch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import * as params from '@params';

const input = document.getElementById('searchInput');
const results = document.getElementById('searchResults');
const status = document.getElementById('searchStatus');
let fuse;
let timer;

async function initialize() {
try {
const response = await fetch('../index.json');
if (!response.ok) throw new Error(`Search index returned ${response.status}`);
const data = await response.json();
if (!Array.isArray(data)) throw new Error('Invalid search index');
fuse = new Fuse(data, {
distance: 100,
threshold: 0.4,
ignoreLocation: true,
keys: ['title', 'permalink', 'summary', 'content'],
...params.fuseOpts
});
input.disabled = false;
status.textContent = 'Search is ready.';
} catch (error) {
console.error('Search unavailable:', error);
status.textContent = 'Search is unavailable. Please try again later or browse the articles.';
}
}

input.addEventListener('input', () => {
clearTimeout(timer);
timer = setTimeout(() => {
const query = input.value.trim();
results.replaceChildren();
if (!query) {
status.textContent = 'Search is ready.';
return;
}
const matches = fuse.search(query);
for (const { item } of matches) {
const li = document.createElement('li');
const link = document.createElement('a');
link.href = item.permalink;
link.textContent = item.title;
li.appendChild(link);
results.appendChild(li);
}
status.textContent = matches.length ? `${matches.length} results found.` : 'No results found.';
}, 150);
});

document.getElementById('searchbox').addEventListener('keydown', (event) => {
const links = [...results.querySelectorAll('a')];
const index = links.indexOf(document.activeElement);
if (event.key === 'ArrowDown' && links.length) {
event.preventDefault();
(links[index + 1] || links[links.length - 1]).focus();
} else if (event.key === 'ArrowUp' && index >= 0) {
event.preventDefault();
(links[index - 1] || input).focus();
} else if (event.key === 'Escape') {
clearTimeout(timer);
input.value = '';
results.replaceChildren();
status.textContent = fuse ? 'Search is ready.' : status.textContent;
if (!input.disabled) input.focus();
}
});

initialize();
112 changes: 66 additions & 46 deletions config.toml
Original file line number Diff line number Diff line change
@@ -1,47 +1,67 @@
baseURL = ''
languageCode = 'en-us'
baseURL = 'https://www.errush.org/'
locale = 'en-US'
title = 'Erlend Rushfeldt - Blog'
theme = 'mainroad'
publishdir = "docs"

[Params.Author] # Used in authorbox
name = "Erlend Rushfeldt"
bio = "Erlend is a Cloud Advisor at Atea in Norway who has a passion for technology and learning. Join him on his journey exploring the cloud!"
avatar = "/img/Erlend-Rushfeldt-BW.jpg"

[Params]
opengraph = true # Enable OpenGraph if true
schema = true # Enable Schema
twitter_cards = true # Enable Twitter Cards if true
readmore = false # Show "Read more" button in list if true
authorbox = false # Show authorbox at bottom of pages if true
toc = false # Enable Table of Contents
pager = true # Show pager navigation (prev/next links) at the bottom of pages if true
post_meta = ["author", "date", "categories", "translations"] # Order of post meta information
mainSections = ["post", "blog", "news"] # Specify section pages to show on home page and the "Recent articles" widget
dateformat = "02-01-2006" # Change the format of dates
mathjax = true # Enable MathJax
mathjaxPath = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js" # Specify MathJax path
mathjaxConfig = "TeX-AMS-MML_HTMLorMML" # Specify MathJax config
googleFontsLink = "https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700" # Load Google Fonts

[Params.thumbnail]
visibility = ["list", "post"] # Control thumbnail visibility

[Params.sidebar]
home = "right" # Configure layout for home page
list = "left" # Configure layout for list pages
single = false # Configure layout for single pages
# Enable widgets in given order
widgets = ["recent", "categories", "taglist", "social"]

[Params.widgets]
recent_num = 5 # Set the number of articles in the "Recent articles" widget
categories_counter = false # Enable counter for each category in "Categories" widget
tags_counter = false # Enable counter for each tag in "Tags" widget

[Params.widgets.social]
# Enable parts of social widget
twitter = "@ErlendRushfeldt"
linkedin = "erlend-rushfeldt-b0a92a159"
github = "Fr3xzy"
theme = 'papermod'
publishDir = 'docs'

[params]
author = 'Erlend Rushfeldt'
description = 'Practical articles on Azure, cloud operations, automation, and cost optimization.'
mainSections = ['post', 'blog', 'news']
defaultTheme = 'auto'
disableSpecial1stPost = true
ShowReadingTime = true
DateFormat = '02-01-2006'
mathjax = false
mathjaxPath = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js'
mathjaxConfig = 'TeX-AMS-MML_HTMLorMML'

[params.assets]
favicon16x16 = '/apple-touch-icon.png'
favicon32x32 = '/apple-touch-icon.png'

[params.social]
twitter = '@ErlendRushfeldt'

[[menu.main]]
name = 'Articles'
url = '/blogposts/'
weight = -20

[[menu.main]]
name = 'Topics'
url = '/tags/'
weight = -10

[[menu.main]]
name = 'Search'
url = '/search/'
weight = 0

[outputs]
home = ['HTML', 'RSS', 'JSON']

[[module.mounts]]
source = 'content'
target = 'content'
[[module.mounts]]
source = 'static'
target = 'static'
[[module.mounts]]
source = 'layouts'
target = 'layouts'
[[module.mounts]]
source = 'data'
target = 'data'
[[module.mounts]]
source = 'assets'
target = 'assets'
[[module.mounts]]
source = 'i18n'
target = 'i18n'
[[module.mounts]]
source = 'archetypes'
target = 'archetypes'
[[module.mounts]]
source = 'static/img'
target = 'assets/legacy-img'
4 changes: 2 additions & 2 deletions content/Blogposts/Cost-Optmization-in-the-wild.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "Cost Optmization in the Wild"
description: "This is a blogpost where you find all code used in my presentation of Cost optimization in the wild."
summary: "Code snippets from the Cost Optimization in the Wild presentation, covering Azure Resource Graph and cloud cost optimization."
date: "2023-06-12T22:27:19+02:00"
categories:
- "Azure"
Expand All @@ -20,7 +21,6 @@ comments: false # Enable Disqus comments for specific page
authorbox: false # Enable authorbox for specific page
pager: false # Enable pager navigation (prev/next) for specific page
toc: false # Enable Table of Contents for specific page
mathjax: true # Enable MathJax for specific page
sidebar: "right" # Enable sidebar (on the right side) per page
widgets: # Enable sidebar widgets in given order per page
- "recent"
Expand All @@ -31,7 +31,7 @@ widgets: # Enable sidebar widgets in given order per page
Here is a collection of snippets of code used in the "Cost Optimization in the wild! - Experiences from reducing costs" presentation.
If you are missing any snippets of code used in a demo, or if you have any other question, feel free to message me on Twitter or LinkedIn.

1. [Orphaned disks](#orphanedDisks)
1. [Orphaned disks](#orphaneddisks)
2. [Old Snapshots](#oldsnapshots)
3. [App Gateways and Load Balancers](#balancers)
4. [Storage v1](#storagev1)
Expand Down
3 changes: 1 addition & 2 deletions content/Blogposts/azure-sql-allowallazureip.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "The SQL Server AllowAllAzureIps setting"
description: ""
description: "Investigate the AllowAllAzureIps setting and firewall rules for Azure SQL servers."
date: "2022-04-27T09:08:39+02:00"
categories:
- "Azure"
Expand All @@ -21,7 +21,6 @@ comments: false # Enable Disqus comments for specific page
authorbox: false # Enable authorbox for specific page
pager: false # Enable pager navigation (prev/next) for specific page
toc: false # Enable Table of Contents for specific page
mathjax: true # Enable MathJax for specific page
sidebar: "right" # Enable sidebar (on the right side) per page
widgets: # Enable sidebar widgets in given order per page
- "recent"
Expand Down
1 change: 0 additions & 1 deletion content/Blogposts/azurebacktoschool23.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ comments: false # Enable Disqus comments for specific page
authorbox: false # Enable authorbox for specific page
pager: false # Enable pager navigation (prev/next) for specific page
toc: false # Enable Table of Contents for specific page
mathjax: true # Enable MathJax for specific page
sidebar: "right" # Enable sidebar (on the right side) per page
widgets: # Enable sidebar widgets in given order per page
- "recent"
Expand Down
1 change: 0 additions & 1 deletion content/Blogposts/azurefw-aadconnectruleset-bicep.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ comments: false # Enable Disqus comments for specific page
authorbox: false # Enable authorbox for specific page
pager: false # Enable pager navigation (prev/next) for specific page
toc: false # Enable Table of Contents for specific page
mathjax: true # Enable MathJax for specific page
sidebar: "right" # Enable sidebar (on the right side) per page
widgets: # Enable sidebar widgets in given order per page
- "recent"
Expand Down
3 changes: 1 addition & 2 deletions content/Blogposts/cost-optimizing-azure-monitor.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Cost Optimizing Azure Monitor"
description: ""
description: "Explore ways to manage Azure Monitor and Log Analytics costs, including workspace design and log ingestion."
date: "2025-03-03T10:30:21+01:00"
categories:
- "Azure"
Expand All @@ -20,7 +20,6 @@ comments: false # Enable Disqus comments for specific page
authorbox: false # Enable authorbox for specific page
pager: false # Enable pager navigation (prev/next) for specific page
toc: false # Enable Table of Contents for specific page
mathjax: true # Enable MathJax for specific page
sidebar: "right" # Enable sidebar (on the right side) per page
widgets: # Enable sidebar widgets in given order per page
- "recent"
Expand Down
3 changes: 1 addition & 2 deletions content/Blogposts/deploymentscripts-in-bicep.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Run scripts on VMs after deployment with Bicep"
description: ""
description: "Use Run Command and Bicep to run configuration scripts on Azure virtual machines after deployment."
date: "2022-08-04T12:34:42+02:00"
categories:
- "Azure"
Expand All @@ -19,7 +19,6 @@ comments: false # Enable Disqus comments for specific page
authorbox: false # Enable authorbox for specific page
pager: false # Enable pager navigation (prev/next) for specific page
toc: false # Enable Table of Contents for specific page
mathjax: true # Enable MathJax for specific page
sidebar: "right" # Enable sidebar (on the right side) per page
widgets: # Enable sidebar widgets in given order per page
- "recent"
Expand Down
Loading
Loading