Skip to content

Commit 480f354

Browse files
committed
First commit
0 parents  commit 480f354

File tree

10 files changed

+180
-0
lines changed

10 files changed

+180
-0
lines changed

.github/workflows/hugo.yaml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Sample workflow for building and deploying a Hugo site to GitHub Pages
2+
name: Deploy Hugo site to Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches:
8+
- main
9+
10+
# Allows you to run this workflow manually from the Actions tab
11+
workflow_dispatch:
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
21+
concurrency:
22+
group: "pages"
23+
cancel-in-progress: false
24+
25+
# Default to bash
26+
defaults:
27+
run:
28+
shell: bash
29+
30+
jobs:
31+
# Build job
32+
build:
33+
runs-on: ubuntu-latest
34+
env:
35+
HUGO_VERSION: 0.124.0
36+
steps:
37+
- name: Install Hugo CLI
38+
run: |
39+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
40+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
41+
- name: Install Dart Sass
42+
run: sudo snap install dart-sass
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
with:
46+
submodules: recursive
47+
fetch-depth: 0
48+
- name: Setup Pages
49+
id: pages
50+
uses: actions/configure-pages@v4
51+
- name: Install Node.js dependencies
52+
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
53+
- name: Build with Hugo
54+
env:
55+
# For maximum backward compatibility with Hugo modules
56+
HUGO_ENVIRONMENT: production
57+
HUGO_ENV: production
58+
run: |
59+
hugo \
60+
--gc \
61+
--minify \
62+
--baseURL "${{ steps.pages.outputs.base_url }}/"
63+
- name: Upload artifact
64+
uses: actions/upload-pages-artifact@v3
65+
with:
66+
path: ./public
67+
68+
# Deployment job
69+
deploy:
70+
environment:
71+
name: github-pages
72+
url: ${{ steps.deployment.outputs.page_url }}
73+
runs-on: ubuntu-latest
74+
needs: build
75+
steps:
76+
- name: Deploy to GitHub Pages
77+
id: deployment
78+
uses: actions/deploy-pages@v4
79+

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/public/
2+
/resources/_gen/
3+
/assets/jsconfig.json
4+
hugo_stats.json
5+
6+
# Executable may be added to repository
7+
hugo.exe
8+
hugo.darwin
9+
hugo.linux
10+
11+
# Temporary lock file while building
12+
/.hugo_build.lock

.gitmodules

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[submodule "smol"]
2+
path = smol
3+
url = https://github.com/colorchestra/smol
4+
[submodule "themes/smol"]
5+
path = themes/smol
6+
url = https://github.com/colorchestra/smol
7+
[submodule "themes/archie"]
8+
path = themes/archie
9+
url = https://github.com/athul/archie

archetypes/default.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
+++
2+
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
3+
date = {{ .Date }}
4+
draft = true
5+
+++

content/about.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
+++
2+
title = 'About'
3+
date = 2024-04-26T10:35:50+02:00
4+
draft = true
5+
+++

content/posts/actix-middleware.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
+++
2+
title = 'Actix Middleware'
3+
date = 2024-04-29T18:04:25+02:00
4+
draft = true
5+
+++

content/posts/foobar.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
+++
2+
title = 'Foobar'
3+
date = 2024-04-25T08:48:09+02:00
4+
draft = true
5+
tags = ['Development', 'Rust']
6+
+++
7+
8+
## Introduction
9+
10+
This is **bold** text, and this is *emphasized* text.
11+
12+
```rust
13+
pub struct Payload {
14+
pub profile: ProfileOrn,
15+
pub namespace: NamespaceOrn,
16+
}
17+
```

hugo.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
baseURL = 'https://tristan.germain.com/'
2+
languageCode = 'en-us'
3+
title = 'Tristan Germain'
4+
theme = "archie"
5+
googleAnalytics = "G-MX928QYSFW"
6+
7+
paginate=3 # articles per page
8+
9+
[params]
10+
mode="dark"
11+
useCDN=false
12+
subtitle ="Thanks to authors who shared their knowledge for free on the internet, I've been and still be able to pass over developing software challenges. This website is my way to give back, I'm writing on stuff I learnt along the way which I hope bring something new to the table."
13+
14+
[[menu.main]]
15+
name = "Home"
16+
url = "/"
17+
weight = 1
18+
19+
[[menu.main]]
20+
name = "Posts"
21+
url = "/posts"
22+
weight = 2
23+
24+
[[menu.main]]
25+
name = "About"
26+
url = "/about"
27+
weight = 4
28+
29+
[[menu.main]]
30+
name = "Tags"
31+
url = "/tags"
32+
weight = 5

layouts/partials/head.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<header>
2+
{{ template "_internal/google_analytics.html" . }}
3+
<div class="main">
4+
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
5+
</div>
6+
<nav>
7+
{{ range .Site.Menus.main }}
8+
<a href="{{ .URL }}">{{ .Name }}</a>
9+
{{ end }}
10+
{{ if eq .Site.Params.mode "toggle" -}}
11+
| <span id="dark-mode-toggle" onclick="toggleTheme()"></span>
12+
<script src="{{ .Site.BaseURL }}js/themetoggle.js"></script>
13+
{{ end }}
14+
</nav>
15+
</header>

themes/archie

Submodule archie added at a1ecb22

0 commit comments

Comments
 (0)