Browse Source

Initial Hugo site skeleton

pull/1/head
ojizero 2 months ago
commit
a8b7a57c52
11 changed files with 65 additions and 0 deletions
  1. 0
    0
      .github/workflow/main.yml
  2. 15
    0
      .gitignore
  3. 0
    0
      .gitmodules
  4. 6
    0
      archetypes/default.md
  5. 16
    0
      config.toml
  6. 0
    0
      content/.gitkeep
  7. 0
    0
      data/.gitkeep
  8. 0
    0
      layouts/.gitkeep
  9. 28
    0
      publish.sh
  10. 0
    0
      static/.gitkeep
  11. 0
    0
      themes/.gitkeep

+ 0
- 0
.github/workflow/main.yml View File


+ 15
- 0
.gitignore View File

@@ -0,0 +1,15 @@

# Created by https://www.gitignore.io/api/hugo
# Edit at https://www.gitignore.io/?templates=hugo

### Hugo ###
# Generated files by hugo
/public/
/resources/_gen/

# Executable may be added to repository
hugo.exe
hugo.darwin
hugo.linux

# End of https://www.gitignore.io/api/hugo

+ 0
- 0
.gitmodules View File


+ 6
- 0
archetypes/default.md View File

@@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---


+ 16
- 0
config.toml View File

@@ -0,0 +1,16 @@
baseURL = "http://ojizero.tech/blog"
languageCode = "en-us"
title = "ojizero/blog"
# theme = "hello-friend"

# [params]
# # dir name of your blog content (default is `content/posts`)
# # contentTypeName = "posts"

# defaultTheme = "dark"

# # if you set this to 0, only submenu trigger will be visible
# # showMenuItems = 2

# # # Show reading time in minutes for posts
# # showReadingTime = true

+ 0
- 0
content/.gitkeep View File


+ 0
- 0
data/.gitkeep View File


+ 0
- 0
layouts/.gitkeep View File


+ 28
- 0
publish.sh View File

@@ -0,0 +1,28 @@
#!/bin/sh

if [ "`git status -s`" ]
then
echo "The working directory is dirty. Please commit any pending changes."
exit 1;
fi

echo "Deleting old publication"
rm -rf public
mkdir public
git worktree prune
rm -rf .git/worktrees/public/

echo "Checking out gh-pages branch into public"
git worktree add -B gh-pages public upstream/gh-pages

echo "Removing existing files"
rm -rf public/*

echo "Generating site"
hugo

echo "Updating gh-pages branch"
cd public && git add --all && git commit -m "Publishing to gh-pages (publish.sh)"

#echo "Pushing to github"
#git push --all

+ 0
- 0
static/.gitkeep View File


+ 0
- 0
themes/.gitkeep View File


Loading…
Cancel
Save