Files
hugo/setup.sh
2025-05-13 22:04:36 +02:00

120 lines
3.2 KiB
Bash
Executable File

#!/bin/bash
rm -rf site
mkdir -p site
cat > site/hugo.yaml << EOF
baseURL: "http://localhost:1313/"
languageCode: "en-us"
title: "PaperMod"
theme: "PaperMod"
menu:
main:
- identifier: archives
name: Archives
url: /archives/
weight: 10
- identifier: tags
name: Tags
url: /tags/
weight: 20
params:
defaultTheme: auto
disableThemeToggle: false
homeInfoParams:
Title: "Hi there \U0001F44B"
Content: "Welcome to my blog"
socialIcons:
- name: twitter
url: "https://twitter.com/"
- name: stackoverflow
url: "https://stackoverflow.com/"
- name: github
url: "https://github.com/"
- name: linkedin
url: "https://linkedin.com/"
- name: cv
url: "https://example.com/"
ShowReadingTime: true
ShowShareButtons: false
ShowPostNavLinks: true
ShowBreadCrumbs: true
ShowCodeCopyButtons: true
hideFooter: false
fuseOpts:
isCaseSensitive: false
shouldSort: true
location: 0
distance: 1000
threshold: 0.4
minMatchCharLength: 0
keys: ["title", "permalink", "summary", "content"]
EOF
mkdir -p site/themes
git clone https://github.com/adityatelange/hugo-PaperMod site/themes/PaperMod
mkdir -p site/content
cat > site/content/archives.md << EOF
---
title: "Archives"
layout: "archives"
url: "/archives/"
summary: "archives"
---
EOF
mkdir -p site/content/posts
CURRENT_DATE=$(date +"%Y-%m-%d")
cat > site/content/posts/papermod-installation.md << EOF
---
title: "Papermod - Installation"
date: 2020-09-15
summary: "Follow this guide to setup hugo and create a new site. Make sure you install latest version of hugo(>=0.57.1). After you have created a new site, at Step 3 follow the steps..."
tags: ["PaperMod"]
author: "Aditya Telange"
---
# Papermod - Installation
Follow this guide to setup hugo and create a new site. Make sure you install latest version of hugo(>=0.57.1). After you have created a new site, at Step 3 follow the steps...
EOF
cat > site/content/posts/papermod-features.md << EOF
---
title: "Papermod - Features"
date: 2020-09-16
summary: "Assets (js/css) The following is enabled by default minification - makes the assets size smallest as possible. bundling - bundles all the styles in one single asset fingerprint/integrity check. Default Theme light/dark..."
tags: ["PaperMod"]
author: "Aditya Telange"
---
# Papermod - Features
Assets (js/css) The following is enabled by default minification - makes the assets size smallest as possible. bundling - bundles all the styles in one single asset fingerprint/integrity check. Default Theme light/dark...
EOF
cat > site/content/posts/markdown-syntax.md << EOF
---
title: "Markdown Syntax Guide"
date: 2019-03-11
summary: "This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme..."
tags: ["markdown", "syntax"]
author: "Hugo Authors"
---
# Markdown Syntax Guide
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme...
EOF
echo "Hugo site with PaperMod theme properly set up to match the demo! Now run the Docker container."