diff --git a/exampleSite/.gitignore b/exampleSite/.gitignore index ca4d540..62fc17f 100644 --- a/exampleSite/.gitignore +++ b/exampleSite/.gitignore @@ -11,6 +11,8 @@ _test *.[568vq] [568vq].out +go.mod +go.sum *.cgo1.go *.cgo2.c _cgo_defun.c diff --git a/exampleSite/config.toml b/exampleSite/config.toml index f2fe36f..da194ab 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -14,14 +14,10 @@ ignoreErrors = ["error-remote-getjson"] theme = "hugo-paper" title = "Paper" -[module] - [[module.imports]] - path = "github.com/nanxiaobei/hugo-paper" - [params] - twitter = 'nanxiaobei' - github = 'nanxiaobei' - instagram = 'nan.xiaobei' + twitter = 'nanxiaobei' + github = 'nanxiaobei' + instagram = 'nan.xiaobei' # ------------------------------ [menu] diff --git a/exampleSite/go.default.mod b/exampleSite/go.default.mod new file mode 100644 index 0000000..73c7904 --- /dev/null +++ b/exampleSite/go.default.mod @@ -0,0 +1,3 @@ +module hugo-paper + +go 1.11 diff --git a/exampleSite/go.mod b/exampleSite/go.mod index aaf8d00..9bd1646 100644 --- a/exampleSite/go.mod +++ b/exampleSite/go.mod @@ -1,2 +1,5 @@ module hugo-paper + go 1.11 + +require github.com/nanxiaobei/hugo-paper v0.0.0-20210824020228-c2e15e6b38e8 // indirect diff --git a/exampleSite/go.toml b/exampleSite/go.toml new file mode 100644 index 0000000..59b9fd3 --- /dev/null +++ b/exampleSite/go.toml @@ -0,0 +1,4 @@ +# Only used for build theme demo site on vercel.com +[module] + [[module.imports]] + path = "github.com/nanxiaobei/hugo-paper" diff --git a/package.json b/package.json index 2dad11e..e8681ad 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,12 @@ "license": "MIT", "private": true, "scripts": { - "site": "hugo server -Dw --minify --disableFastRender --themesDir ../.. --source exampleSite", + "server": "hugo server -Dw --minify --disableFastRender --themesDir ../.. --source exampleSite", "open": "open http://localhost:1313/", - "dev": "yarn open & yarn site", - "build": "hugo --gc --minify --themesDir ../.. --source exampleSite" + "go": "cp exampleSite/go.default.mod exampleSite/go.mod", + "site": "hugo --gc --minify --config go.toml,config.toml --themesDir ../.. --source exampleSite", + "dev": "yarn open & yarn server", + "build": "yarn go & yarn site" }, "dependencies": { "prettier": "^2.3.2", diff --git a/yarn.lock b/yarn.lock index 85aab65..702efc8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -238,9 +238,9 @@ unist-util-find-all-after "^3.0.2" "@types/mdast@^3.0.0": - version "3.0.9" - resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.9.tgz#3f7fa18faf9e567da9aa49e44ecc76ad33c359ce" - integrity sha512-IUlIhG2KNPjOEuXIblTjovD1XW8HPGeulA12nEyc6xhO4Yrrcs+xczAl4ucR3cpwVlE+vb2x9Z7pRmVP4bUHng== + version "3.0.10" + resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.10.tgz#4724244a82a4598884cbbe9bcfd73dff927ee8af" + integrity sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA== dependencies: "@types/unist" "*" @@ -543,9 +543,9 @@ domutils@^1.5.1: domelementtype "1" electron-to-chromium@^1.3.811: - version "1.3.814" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.814.tgz#418fad80c3276a46103ca72a21a8290620d83c4a" - integrity sha512-0mH03cyjh6OzMlmjauGg0TLd87ErIJqWiYxMcOLKf5w6p0YEOl7DJAj7BDlXEFmCguY5CQaKVOiMjAMODO2XDw== + version "1.3.815" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.815.tgz#2372090c909cb52cb0afe1642cffa91cbe08b721" + integrity sha512-2QaE8L5l3BDf82ZXcm0TpWOPoCVUwrp3lKiYzgUbdhRAO2sW60ZdKS5T8yq4r7y1ZeiKJXnf5u8n9u3ldnj5Bw== emoji-regex@^8.0.0: version "8.0.0"