From aa3f4536ad41a6ee5d90df19c4b2d34b97a81d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jens=20Bech-S=C3=B8rensen?= Date: Tue, 13 May 2025 22:04:36 +0200 Subject: [PATCH] clean --- compose.yml | 4 +- content/docs/123.md | 15 --- content/docs/_index.md | 8 -- content/docs/example.md | 15 --- content/posts/aaa.md | 1 - content/posts/first-post.md | 9 -- hugo.yaml | 3 - setup-cross-platform.sh | 166 ------------------------- setup-papermod-standard.sh => setup.sh | 13 -- yeet.sh | 4 + 10 files changed, 6 insertions(+), 232 deletions(-) delete mode 100644 content/docs/123.md delete mode 100644 content/docs/_index.md delete mode 100644 content/docs/example.md delete mode 100644 content/posts/aaa.md delete mode 100644 content/posts/first-post.md delete mode 100755 setup-cross-platform.sh rename setup-papermod-standard.sh => setup.sh (88%) create mode 100644 yeet.sh diff --git a/compose.yml b/compose.yml index a513374..84d8304 100644 --- a/compose.yml +++ b/compose.yml @@ -1,8 +1,8 @@ services: hugo: - image: ghcr.io/gohugoio/hugo:latest # Official Hugo image + image: ghcr.io/gohugoio/hugo:latest container_name: hugo-blog - platform: linux/amd64 # Use emulation for M4 chip + platform: linux/amd64 volumes: - ./site:/src ports: diff --git a/content/docs/123.md b/content/docs/123.md deleted file mode 100644 index 7fe4d5f..0000000 --- a/content/docs/123.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Example Page" -weight: 1 ---- - -# Example Documentation - -This is an example page using the Book theme. - -## Features - -- Clean documentation layout -- Sidebar navigation -- Search functionality -- Mobile friendly designdddd diff --git a/content/docs/_index.md b/content/docs/_index.md deleted file mode 100644 index e8516e5..0000000 --- a/content/docs/_index.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -title: "Documentation" -weight: 1 ---- - -# Documentation - -Welcome to the documentation section. This demonstrates the Book theme's documentation capabilities. diff --git a/content/docs/example.md b/content/docs/example.md deleted file mode 100644 index d8d37d0..0000000 --- a/content/docs/example.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: "Example Page" -weight: 1 ---- - -# Example Documentation - -This is an example page using the Book theme. - -## Features - -- Clean documentation layout -- Sidebar navigation -- Search functionality -- Mobile friendly design diff --git a/content/posts/aaa.md b/content/posts/aaa.md deleted file mode 100644 index 1d60b70..0000000 --- a/content/posts/aaa.md +++ /dev/null @@ -1 +0,0 @@ -ddd diff --git a/content/posts/first-post.md b/content/posts/first-post.md deleted file mode 100644 index 2d5bf47..0000000 --- a/content/posts/first-post.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "My First Post" -date: 2025-05-13 -draft: false ---- - -# Hello World! - -This is my first blog post using the Book theme. diff --git a/hugo.yaml b/hugo.yaml index dd29aa9..f6ca40e 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -3,10 +3,7 @@ languageCode: "en-us" title: "My Documentation Site" theme: "book" -# Book theme specific parameters params: - # (Optional) Set to 'true' to mark as draft - # bookDraft: true # (Optional) Set this to the section name if section is not root # bookSection: docs diff --git a/setup-cross-platform.sh b/setup-cross-platform.sh deleted file mode 100755 index 9a6c136..0000000 --- a/setup-cross-platform.sh +++ /dev/null @@ -1,166 +0,0 @@ -#!/bin/bash - -# Remove any previous setup to start fresh -rm -rf site -mkdir -p site - -# Create hugo.yaml config file -cat > site/hugo.yaml << EOF -baseURL: "http://localhost:1313/" -languageCode: "en-us" -title: "Jens Bech's Blog" -theme: "PaperMod" - -# Menu items -menu: - main: - - identifier: archive - name: Archive - url: /archive/ - weight: 10 - - identifier: categories - name: Categories - url: /categories/ - weight: 20 - - identifier: tags - name: Tags - url: /tags/ - weight: 30 - - identifier: search - name: Search - url: /search/ - weight: 40 - -# PaperMod theme specific parameters -params: - # Theme appearance - defaultTheme: auto - disableThemeToggle: false - - # Homepage settings - profileMode: - enabled: true - title: "Jens Bech" - subtitle: "Welcome to my minimalist blog" - imageUrl: "/images/profile.jpg" - buttons: - - name: Archive - url: "/archive/" - - name: Categories - url: "/categories/" - - name: Tags - url: "/tags/" - - # Display settings - ShowReadingTime: true - ShowShareButtons: false - ShowPostNavLinks: true - ShowBreadCrumbs: true - ShowCodeCopyButtons: true - hideFooter: false - - # Search settings - fuseOpts: - isCaseSensitive: false - shouldSort: true - location: 0 - distance: 1000 - threshold: 0.4 - minMatchCharLength: 0 - keys: ["title", "permalink", "summary", "content"] -EOF - -# Create theme directory -mkdir -p site/themes -# Clone the PaperMod theme -git clone https://github.com/adityatelange/hugo-PaperMod site/themes/PaperMod - -# Create search page -mkdir -p site/content -cat > site/content/search.md << EOF ---- -title: "Search" -layout: "search" -summary: "search" ---- -EOF - -# Create archive page -cat > site/content/archive.md << EOF ---- -title: "Archive" -layout: "archives" -url: "/archive/" -summary: "archives" ---- -EOF - -# Create example blog posts -mkdir -p site/content/posts - -# Get current date - works on both systems -CURRENT_DATE=$(date +"%Y-%m-%d") - -# Calculate tomorrow's date in a cross-platform way -# First try macOS syntax -if date -v+1d &>/dev/null; then - # macOS date command - TOMORROW=$(date -v+1d +"%Y-%m-%d") -elif date -d "+1 day" &>/dev/null; then - # Linux date command - TOMORROW=$(date -d "+1 day" +"%Y-%m-%d") -else - # Fallback - just use current date for both - TOMORROW=$CURRENT_DATE -fi - -cat > site/content/posts/first-post.md << EOF ---- -title: "My First Post" -date: ${CURRENT_DATE} -draft: false -tags: ["blog", "tech"] -categories: ["personal"] -author: "Jens Bech" ---- - -# Hello World! - -This is my first blog post using the PaperMod theme. It's a clean, elegant theme with great features: - -## Features - -- Light/Dark mode toggle -- Clean design with good typography -- Mobile-friendly interface -- Fast loading times -- Search capability -- Archive view for browsing all posts -EOF - -cat > site/content/posts/second-post.md << EOF ---- -title: "Getting Started with Hugo" -date: ${TOMORROW} -draft: false -tags: ["hugo", "guide"] -categories: ["tutorials"] -author: "Jens Bech" ---- - -# Getting Started with Hugo - -Hugo is an amazing static site generator that makes blogging a breeze! - -## Why Hugo? - -- Blazing fast performance -- Flexible content management -- Simple deployment -- Great theme ecosystem -EOF - -# Create directory for images -mkdir -p site/static/images - -echo "Hugo site with PaperMod theme properly set up! Now run the Docker container." diff --git a/setup-papermod-standard.sh b/setup.sh similarity index 88% rename from setup-papermod-standard.sh rename to setup.sh index e8f9c11..d60bb7c 100755 --- a/setup-papermod-standard.sh +++ b/setup.sh @@ -1,17 +1,14 @@ #!/bin/bash -# Remove any previous setup to start fresh rm -rf site mkdir -p site -# Create hugo.yaml config file matching the demo image cat > site/hugo.yaml << EOF baseURL: "http://localhost:1313/" languageCode: "en-us" title: "PaperMod" theme: "PaperMod" -# Menu items menu: main: - identifier: archives @@ -23,13 +20,10 @@ menu: url: /tags/ weight: 20 -# PaperMod theme specific parameters params: - # Theme appearance defaultTheme: auto disableThemeToggle: false - # Homepage settings - NOT using profileMode (showing list of posts) homeInfoParams: Title: "Hi there \U0001F44B" Content: "Welcome to my blog" @@ -46,7 +40,6 @@ params: - name: cv url: "https://example.com/" - # Display settings ShowReadingTime: true ShowShareButtons: false ShowPostNavLinks: true @@ -54,7 +47,6 @@ params: ShowCodeCopyButtons: true hideFooter: false - # Search settings fuseOpts: isCaseSensitive: false shouldSort: true @@ -65,12 +57,9 @@ params: keys: ["title", "permalink", "summary", "content"] EOF -# Create theme directory mkdir -p site/themes -# Clone the PaperMod theme git clone https://github.com/adityatelange/hugo-PaperMod site/themes/PaperMod -# Create archive page mkdir -p site/content cat > site/content/archives.md << EOF --- @@ -81,10 +70,8 @@ summary: "archives" --- EOF -# Create example blog posts exactly like in the demo mkdir -p site/content/posts -# Get current date in YYYY-MM-DD format CURRENT_DATE=$(date +"%Y-%m-%d") cat > site/content/posts/papermod-installation.md << EOF diff --git a/yeet.sh b/yeet.sh new file mode 100644 index 0000000..efd8d7a --- /dev/null +++ b/yeet.sh @@ -0,0 +1,4 @@ +chmod +x setup.sh +./setup-papermod-standard.sh +docker compose down +docker compose up -d \ No newline at end of file