clean
This commit is contained in:
@ -1,8 +1,8 @@
|
|||||||
services:
|
services:
|
||||||
hugo:
|
hugo:
|
||||||
image: ghcr.io/gohugoio/hugo:latest # Official Hugo image
|
image: ghcr.io/gohugoio/hugo:latest
|
||||||
container_name: hugo-blog
|
container_name: hugo-blog
|
||||||
platform: linux/amd64 # Use emulation for M4 chip
|
platform: linux/amd64
|
||||||
volumes:
|
volumes:
|
||||||
- ./site:/src
|
- ./site:/src
|
||||||
ports:
|
ports:
|
||||||
|
@ -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
|
|
@ -1,8 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Documentation"
|
|
||||||
weight: 1
|
|
||||||
---
|
|
||||||
|
|
||||||
# Documentation
|
|
||||||
|
|
||||||
Welcome to the documentation section. This demonstrates the Book theme's documentation capabilities.
|
|
@ -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
|
|
@ -1 +0,0 @@
|
|||||||
ddd
|
|
@ -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.
|
|
@ -3,10 +3,7 @@ languageCode: "en-us"
|
|||||||
title: "My Documentation Site"
|
title: "My Documentation Site"
|
||||||
theme: "book"
|
theme: "book"
|
||||||
|
|
||||||
# Book theme specific parameters
|
|
||||||
params:
|
params:
|
||||||
# (Optional) Set to 'true' to mark as draft
|
|
||||||
# bookDraft: true
|
|
||||||
|
|
||||||
# (Optional) Set this to the section name if section is not root
|
# (Optional) Set this to the section name if section is not root
|
||||||
# bookSection: docs
|
# bookSection: docs
|
||||||
|
@ -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."
|
|
@ -1,17 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Remove any previous setup to start fresh
|
|
||||||
rm -rf site
|
rm -rf site
|
||||||
mkdir -p site
|
mkdir -p site
|
||||||
|
|
||||||
# Create hugo.yaml config file matching the demo image
|
|
||||||
cat > site/hugo.yaml << EOF
|
cat > site/hugo.yaml << EOF
|
||||||
baseURL: "http://localhost:1313/"
|
baseURL: "http://localhost:1313/"
|
||||||
languageCode: "en-us"
|
languageCode: "en-us"
|
||||||
title: "PaperMod"
|
title: "PaperMod"
|
||||||
theme: "PaperMod"
|
theme: "PaperMod"
|
||||||
|
|
||||||
# Menu items
|
|
||||||
menu:
|
menu:
|
||||||
main:
|
main:
|
||||||
- identifier: archives
|
- identifier: archives
|
||||||
@ -23,13 +20,10 @@ menu:
|
|||||||
url: /tags/
|
url: /tags/
|
||||||
weight: 20
|
weight: 20
|
||||||
|
|
||||||
# PaperMod theme specific parameters
|
|
||||||
params:
|
params:
|
||||||
# Theme appearance
|
|
||||||
defaultTheme: auto
|
defaultTheme: auto
|
||||||
disableThemeToggle: false
|
disableThemeToggle: false
|
||||||
|
|
||||||
# Homepage settings - NOT using profileMode (showing list of posts)
|
|
||||||
homeInfoParams:
|
homeInfoParams:
|
||||||
Title: "Hi there \U0001F44B"
|
Title: "Hi there \U0001F44B"
|
||||||
Content: "Welcome to my blog"
|
Content: "Welcome to my blog"
|
||||||
@ -46,7 +40,6 @@ params:
|
|||||||
- name: cv
|
- name: cv
|
||||||
url: "https://example.com/"
|
url: "https://example.com/"
|
||||||
|
|
||||||
# Display settings
|
|
||||||
ShowReadingTime: true
|
ShowReadingTime: true
|
||||||
ShowShareButtons: false
|
ShowShareButtons: false
|
||||||
ShowPostNavLinks: true
|
ShowPostNavLinks: true
|
||||||
@ -54,7 +47,6 @@ params:
|
|||||||
ShowCodeCopyButtons: true
|
ShowCodeCopyButtons: true
|
||||||
hideFooter: false
|
hideFooter: false
|
||||||
|
|
||||||
# Search settings
|
|
||||||
fuseOpts:
|
fuseOpts:
|
||||||
isCaseSensitive: false
|
isCaseSensitive: false
|
||||||
shouldSort: true
|
shouldSort: true
|
||||||
@ -65,12 +57,9 @@ params:
|
|||||||
keys: ["title", "permalink", "summary", "content"]
|
keys: ["title", "permalink", "summary", "content"]
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Create theme directory
|
|
||||||
mkdir -p site/themes
|
mkdir -p site/themes
|
||||||
# Clone the PaperMod theme
|
|
||||||
git clone https://github.com/adityatelange/hugo-PaperMod site/themes/PaperMod
|
git clone https://github.com/adityatelange/hugo-PaperMod site/themes/PaperMod
|
||||||
|
|
||||||
# Create archive page
|
|
||||||
mkdir -p site/content
|
mkdir -p site/content
|
||||||
cat > site/content/archives.md << EOF
|
cat > site/content/archives.md << EOF
|
||||||
---
|
---
|
||||||
@ -81,10 +70,8 @@ summary: "archives"
|
|||||||
---
|
---
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Create example blog posts exactly like in the demo
|
|
||||||
mkdir -p site/content/posts
|
mkdir -p site/content/posts
|
||||||
|
|
||||||
# Get current date in YYYY-MM-DD format
|
|
||||||
CURRENT_DATE=$(date +"%Y-%m-%d")
|
CURRENT_DATE=$(date +"%Y-%m-%d")
|
||||||
|
|
||||||
cat > site/content/posts/papermod-installation.md << EOF
|
cat > site/content/posts/papermod-installation.md << EOF
|
Reference in New Issue
Block a user