From 84c9aeba92e2b2270b87dff7eb5886c1ec9109fa Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Sun, 7 Jan 2024 02:56:47 +0800 Subject: [PATCH] initial commit --- .gitignore | 15 +++++++ archetypes/default.md | 5 +++ assets/img/author.jpg | Bin 0 -> 9832 bytes config/_default/hugo.toml | 8 ++++ config/_default/languages.en.toml | 13 ++++++ config/_default/languages.zh-cn.toml | 13 ++++++ config/_default/menus.en.toml | 23 ++++++++++ config/_default/menus.zh-cn.toml | 29 +++++++++++++ config/_default/module.toml | 2 + config/_default/params.toml | 20 +++++++++ content/posts/.gitkeep | 0 data/.gitkeep | 0 flake.lock | 61 +++++++++++++++++++++++++++ flake.nix | 16 +++++++ go.mod | 5 +++ go.sum | 2 + i18n/.gitkeep | 0 layouts/.gitkeep | 0 static/.gitkeep | 0 themes/.gitkeep | 0 20 files changed, 212 insertions(+) create mode 100644 .gitignore create mode 100644 archetypes/default.md create mode 100644 assets/img/author.jpg create mode 100644 config/_default/hugo.toml create mode 100644 config/_default/languages.en.toml create mode 100644 config/_default/languages.zh-cn.toml create mode 100644 config/_default/menus.en.toml create mode 100644 config/_default/menus.zh-cn.toml create mode 100644 config/_default/module.toml create mode 100644 config/_default/params.toml create mode 100644 content/posts/.gitkeep create mode 100644 data/.gitkeep create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 go.mod create mode 100644 go.sum create mode 100644 i18n/.gitkeep create mode 100644 layouts/.gitkeep create mode 100644 static/.gitkeep create mode 100644 themes/.gitkeep diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..54c8762 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# https://github.com/github/gitignore/blob/main/community/Golang/Hugo.gitignore + +# Generated files by hugo +/public/ +/resources/_gen/ +/assets/jsconfig.json +hugo_stats.json + +# Executable may be added to repository +hugo.exe +hugo.darwin +hugo.linux + +# Temporary lock file while building +.hugo_build.lock 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/assets/img/author.jpg b/assets/img/author.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1a5d28cbc117f98a08ae0532e461b1b8df3450d7 GIT binary patch literal 9832 zcmeHsXHZn#w(TZo5a?DKi2{-Yi9(YR8w3<+umJ(dND?IHj0m;_0Z~D6hNeMs5&_9M z2MLl>BRS{We&^J=x8AK+_0IXe^XJuBRikTH_ujjDtU1>lW6gCnel-ca0*DC-i3kaZ ziHL|uNQgo@2i^c=T2xwv^mMDK}-LnRa*z!a4pDywKcL1^pfKGicb zw|H)8Wo_f^;_Bw^;pr9pD&%!&*c)U_?EAP6A3wz>q-SJiW#{DP<(HI}l~+_&Ro8rP zYHn$5YwzeB92y=O9UK2KF*m=kxU{^ox`x@=-P=DnJUTu(#R2gCMhE-(H$wk|4>gt# zEVRPt1WDkEI=c!uG)&)+CZMxJEhzlbFYywY>exAFl-SSnCPX(60ss zC6#0(hwY0|?cTGITlpM7P$%QCke8xZ0?^^q@kL+8JnEBpuT)8de&U!Gr zGgQaH(8Zk&NxVb!nPG8qH&StFP_)I1p->LAa^P;7a44)e|l+2X9(LYU($CBEcXaGGY2sLnkogHJ-!(ISV};4o10 zUmK%`o5dNDUl1C~rVhZt?RPDW`?4SPwu@*1A9%jGf7fuzDfq>4+X8V}ovIN9@$zos zo18dzwuO?}@F+h?v(aj6SBR*m5j-BuQFGh!NiUAQny|sha%Mq9UJLr6Dsk9)u$nfd zj8@8vJ$TQEe_xi{44DbiS3xtf$E078RcmYH*=p7H9FI>ncP!^ZQt>J?Ais) z=en)7W=p4#xA3aK7nK-mu-&HaGbQ@s2{j7aF6xRTX}d={oC*ya*a)>M34oLq#bgT;CJ$N zg>0uVoGaAtAetsymi4U_ZrZ&iuO`}pGWsPE5?DweIa(=FlzDk`Em-m(?V`;-25#!1 zA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`5p%P^dmZ~{y@NLlT|7ivxTu+sa1zFhXnCv{&!M!U$ z>lyyVjdg=7AWU|6^5QXIJOBgnHJs6pT}q{10fn~b`FhCzalQYcjcp3MeKE!EV*>sh zaw7uslRp zEMGK-JqnUuQC>u9>xIX>!6##-B~D}J9X}$teqqgEdSt57>0@+NAKADDfmf-enXA9khf%lPKFLIO zNABllzX)C)^EPfR@ZHCB^0rjO(2+NkTqhzYq?B;Q)*_v{W66e7qgMrTf%r#*w|{IV z$(tqTOW%l0I$JK!dEBMRA<4*5^BzmrB#4V`2pNOqty;l`C-6^o>ablt;zs1VOuY3c zOx&RJh7`Z@G^H1sU%ESa_9k1;7p&K#5sQ`4>Ua(ZpaOgm&Dr2^O%0qutiK~v201_2 zQ9Zo>e*F%!ja<)eNwR z=+X>m^0fwcTSk;{vG|#t^Y)2iO((r?x8gGzxAH0?nJ2x5x6d7;Pe+B)M_cpLEhE5-_tIR=Zp_Zk6bQ0m?5!cVzjs%D2WlD-0ZFwVs3VkX(Oy#|NfJ5NQ%!q5C6Vu zD|20qF_~Z+ix8TM=_F=5Kg`ax&P{skBBRn!So)m_zkbI6eak;% zJX>L^s(m^VH$0+EyibbsU_)W9^0nyA@@m`Lm3EU!cArgUiwy&O1)n{-zOAR9Rad4A z5{$^B=R&}L5m09oregR*Z_IAJKJu4goYd5cT**@kys zU#h4LQUsFN-fm$cR;b$Jp+mV;ys literal 0 HcmV?d00001 diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml new file mode 100644 index 0000000..82fb750 --- /dev/null +++ b/config/_default/hugo.toml @@ -0,0 +1,8 @@ +# config/_default/config.toml + +baseURL = "https://Guanran928.github.io/" + +languageCode = 'zh-cn' +defaultContentLanguage = 'zh-cn' +#defaultContentLanguageInSubdir = true +hasCJKLanguage = true diff --git a/config/_default/languages.en.toml b/config/_default/languages.en.toml new file mode 100644 index 0000000..befdb65 --- /dev/null +++ b/config/_default/languages.en.toml @@ -0,0 +1,13 @@ +# config/_default/languages.en.toml + +languageCode = "en" +languageName = "English" + +title = "Guanran928's blog." + +[author] +name = "Guanran928" +image = "img/author.jpg" +headline = "This is me, probably." +bio = "Not a developer." +links = [{ github = "https://github.com/Guanran928" }] diff --git a/config/_default/languages.zh-cn.toml b/config/_default/languages.zh-cn.toml new file mode 100644 index 0000000..b1bd00e --- /dev/null +++ b/config/_default/languages.zh-cn.toml @@ -0,0 +1,13 @@ +# config/_default/languages.zh-cn.toml + +languageCode = "zh-cn" +languageName = "简体中文" + +title = "Guanran928's 的博客。" + +[author] +name = "Guanran928" +image = "img/author.jpg" +headline = "这有可能是我。" +bio = "我不是程序员。" +links = [{ github = "https://github.com/Guanran928" }] diff --git a/config/_default/menus.en.toml b/config/_default/menus.en.toml new file mode 100644 index 0000000..71b8554 --- /dev/null +++ b/config/_default/menus.en.toml @@ -0,0 +1,23 @@ +# config/_default/menus.en.toml + +#[[main]] +# name = "Blog" +# pageRef = "posts" +# weight = 10 + +[[main]] +name = "GitHub" +url = "https://github.com/Guanran928/Guanran928.github.io" +weight = 30 + +[main.params] +icon = "github" +showName = false +target = "_blank" + +[[main]] +identifier = "search" +weight = 99 +[main.params] +action = "search" +icon = "search" diff --git a/config/_default/menus.zh-cn.toml b/config/_default/menus.zh-cn.toml new file mode 100644 index 0000000..a2ab7cc --- /dev/null +++ b/config/_default/menus.zh-cn.toml @@ -0,0 +1,29 @@ +# config/_default/menus.zh-cn.toml + + +[[main]] +name = "文章" +pageRef = "posts" +weight = 10 + +[[main]] +name = "标签" +pageRef = "tags" +weight = 20 + +[[main]] +name = "GitHub" +url = "https://github.com/Guanran928/Guanran928.github.io" +weight = 30 + +[main.params] +icon = "github" +showName = false +target = "_blank" + +[[main]] +identifier = "search" +weight = 99 +[main.params] +action = "search" +icon = "search" diff --git a/config/_default/module.toml b/config/_default/module.toml new file mode 100644 index 0000000..03049d0 --- /dev/null +++ b/config/_default/module.toml @@ -0,0 +1,2 @@ +[[imports]] +path = "github.com/jpanther/congo/v2" diff --git a/config/_default/params.toml b/config/_default/params.toml new file mode 100644 index 0000000..b5b0f13 --- /dev/null +++ b/config/_default/params.toml @@ -0,0 +1,20 @@ +# config/_default/params.toml + +colorScheme = "ocean" +enableSearch = true +enableCodeCopy = true + +[homepage] +layout = "profile" + +[header] +#layout = "hamburger" + +[article] +showBreadcrumbs = true +showTableOfContents = true +showWordCount = true + +[list] +showBreadcrumbs = true +showTableOfContents = true diff --git a/content/posts/.gitkeep b/content/posts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..557beca --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1704420045, + "narHash": "sha256-C36QmoJd5tdQ5R9MC1jM7fBkZW9zBUqbUCsgwS6j4QU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c1be43e8e837b8dbee2b3665a007e761680f0c3d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..8731286 --- /dev/null +++ b/flake.nix @@ -0,0 +1,16 @@ +{ + description = "Guanran928's blog"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = inputs: + inputs.flake-utils.lib.eachDefaultSystem (system: let + pkgs = inputs.nixpkgs.legacyPackages.${system}; + in { + ### nix fmt + formatter = inputs.nixpkgs.legacyPackages.${system}.alejandra; + + ### nix develop + devShells.default = pkgs.mkShell {packages = with pkgs; [hugo go];}; + }); +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..f83bceb --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module myblog + +go 1.21.5 + +require github.com/jpanther/congo/v2 v2.7.6 // indirect diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..d5b9574 --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/jpanther/congo/v2 v2.7.6 h1:gBz+Zx6PIVgMhknn0t9uOUQA0sSBFKhH4Miox/q9xew= +github.com/jpanther/congo/v2 v2.7.6/go.mod h1:1S7DRoO1ZYS4YUdFd1LjTkdyjQwsjFWd8TqSfz3Jd+M= diff --git a/i18n/.gitkeep b/i18n/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/layouts/.gitkeep b/layouts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/static/.gitkeep b/static/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/themes/.gitkeep b/themes/.gitkeep new file mode 100644 index 0000000..e69de29