Fix SSG and just commmands

This commit is contained in:
Michal Vanko 2024-09-15 22:08:44 +02:00
parent e8330c10c2
commit 50694c43f5
5 changed files with 46 additions and 10 deletions

View File

@ -0,0 +1,25 @@
# CI/CD Pipeline
Gitea server for production.
Github actions for build and release.
Release -> Publish.
## Build step
1. Compile project
2. Run in production mode
3. wget command to download and create a static site.
a) ensure every image is downloaded and created / we can create a cache mechanism to download images from previous build / save a ton of time
4. Backup old version
5. Publish new version
## Development
1. Build the project
2. Wget cannot be run on dev server due to tower reload
## TODO
- Some weird links (Colemak)

View File

@ -52,9 +52,18 @@ kill:
clean:
rm -rf dist
# SSG
ssg:
- wget --no-convert-links -r -p -E -P dist --no-host-directories 127.0.0.1:{{port}}
- wget -P dist/svg 127.0.0.1:{{port}}/svg/icons-sprite.svg
# Preview server
preview:
npx http-server dist
# SSG export of production server
export: clean
just prod &
just wait_for_port
- wget --convert-links -r -p --level 1 -E -P dist --no-host-directories localhost:{{port}}
just ssg
just kill

View File

@ -49,8 +49,14 @@ async fn main() {
axum::serve(listener, app).await.unwrap();
}
// TODO responsive design
// TODO Variable weight for font, setup boldness for <strong> and h1 h2 ... elements
// - contact
// TODO Socials
// TODO ul li article styles
// TODO header height difference
// - fotos
// TODO Colors
// TODO print css and other 404 css linked in base.html
// TODO go live pipeline
// TODO after release
// - contact
// - projects page
// - linktree page

View File

@ -15,12 +15,6 @@
title="RSS feed for latest posts"
href="https://michalvanko.dev/feed.xml"
/>
<link
rel="alternate"
title="JSON feed for latest posts"
type="application/json"
href="https://michalvanko.dev/feed.json"
/>
<!-- Tailwind output file -->
<link rel="stylesheet" href="/styles/output.css" />

View File

@ -37,5 +37,7 @@
alt="nd"
class="inline-block h-6 mx-0.5"
/></a>
<!-- TODO Display link to feed with icon -->
<a href="/feed.xml" class="hidden">RSS feed</a>
</p>
</footer>