diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c4b387a --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.hugo_build.lock +public/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..26bcb4c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/hyde"] + path = themes/hyde + url = https://github.com/spf13/hyde.git diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..c6f3fce --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +title = '{{ replace .File.ContentBaseName "-" " " | title }}' +date = {{ .Date }} +draft = true ++++ diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..0d9d985 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,15 @@ +baseURL = 'https://btogxx.github.io' +languageCode = 'zh' +title = '杂记' +theme = "hyde" + +[Menus] + main = [ + {Name = "GitHub", URL = "https://github.com/btogxx"}, + {Name = "Twitter", URL = "https://x.com/sissy_xnm"}, + {Name = "E-Mail", URL = "mailto:btogxx@gmail.com"} + ] + +[params] + description = "一个MTF程序媛,随便记录点东西,防止忘记自己是谁!" + diff --git a/publish b/publish new file mode 100755 index 0000000..c636002 --- /dev/null +++ b/publish @@ -0,0 +1,13 @@ +#! /bin/sh + +commit_id=$(git log | head -n3 | awk '/commit/{print $2}' | head -c7) +hugo --minify +cd public +[ -d .git ] && rm -rf .git +git init +git branch -m publish +cp ../.git/config .git/ +git remote add origin git@github.com:btogxx/btogxx.github.io.git +git add . +git commit -m "generate from $commit_id" +git push -f origin publish