diff options
| author | roninro <liumy.f@foxmail.com> | 2022-07-28 19:17:56 +0800 |
|---|---|---|
| committer | roninro <liumy.f@foxmail.com> | 2022-07-28 19:26:10 +0800 |
| commit | b60e2467de21a7760ca60e472901d5de4c11d8ba (patch) | |
| tree | 6ebb2080723c721b5b3de90c56a9daa48128ef3c | |
| parent | acb102c143ae7044ac2efe91e9d78ec742ca1258 (diff) | |
update README.md
| -rw-r--r-- | README.md | 118 | ||||
| -rw-r--r-- | exampleSite/config.toml | 11 | ||||
| -rw-r--r-- | netlify.toml | 10 |
3 files changed, 135 insertions, 4 deletions
@@ -4,3 +4,121 @@ ## Installation +```bash +$ git clone https://github.com/roninro/hugo-theme-puppet.git themes/puppet +``` + +## Configuration + +Config.toml example + +```toml +baseurl = "/" +title = "Puppet" +languageCode = "en-us" +paginate = 10 # Number of posts per page +theme = "puppet" + +disqusShortname = "" # Enable Disqus comments by entering your Disqus shortname + +enableInlineShortcodes = true +enableEmoji = true + + +[outputs] +home = ["HTML", "JSON"] + +[taxonomies] +category = "categories" +tag = "tags" +series = "series" # + +[markup] +[markup.highlight] +codeFences = true +guessSyntax = true +lineNos = true +lineNumbersInTable = false +style = "dracula" + +[markup.goldmark.renderer] +unsafe = true + +[menu] +[[menu.main]] +identifier = "home" +name = "Home" +url = "/" +weight = -100 +[[menu.main]] +identifier = "about" +name = "About" +url = "/about/" +weight = 100 +[[menu.main]] +identifier = "archive" +name = "Archive" +url = "/archive/" +weight = 10 + + +[params] +author = "Puppet" +description = "A simple and clean theme for Hugo" +keywords = "blog,developer,personal" +img_home = "/img/home-bg.jpg" +img_404 = "/img/404-bg.jpg" + +[params.sidebar] +enable = true +avatar = "/img/home-bg.jpg" +bio = "John Doe's personal website" + +[params.social] +rss_enable = true +twitter = "johndoe" +facebook = "johndoe" +zhihu = "johndoe" +weibo = "johndoe" +github = "johndoe" +linkedin = "johndoe" + +[[params.friends]] +name = "John Doe" +url = "https://gohugo.io" + +[[params.friends]] +name = "John Doe" +url = "https://gohugo.io" + +# See https://giscus.app/ +[params.giscus] +enable = false +repo = "" +repo_id = "" +category = "" +category_id = "" +input_position = "" +theme = "light" +``` + +## Front Matter example + +see [default.md](archetypes/default.md) + +```markdown ++++ +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +header_img: "" +short: false +toc = true +tags = [] +categories = [] ++++ +``` + +## License + +[MIT](LICENSE)
\ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 448d6e6..0c9877c 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,10 +1,12 @@ baseURL = "http://localhost:1313/" title = "Puppet Theme" -author = "Roninro" + copyright = "" paginate = 3 languageCode = "en" -DefaultContentLanguage = "en" +defaultContentLanguage = "en" + +hasCJKLanguage = false enableInlineShortcodes = true enableEmoji = true # prevent build failures when using Hugo's Instagram shortcode due to deprecated Instagram API. @@ -15,6 +17,7 @@ theme = "puppet" themesDir = "../.." disqusShortname = "" +googleAnalytics = "" [outputs] home = ["HTML", "JSON"] @@ -64,8 +67,8 @@ weight = 30 [params] -author = "John Doe" -description = "John Doe's personal website" +author = "Puppet" +description = "A simple and clean theme for Hugo" keywords = "blog,developer,personal" img_home = "/img/home-bg.jpg" img_404 = "/img/404-bg.jpg" diff --git a/netlify.toml b/netlify.toml index 6fcba09..5f9bf27 100644 --- a/netlify.toml +++ b/netlify.toml @@ -12,3 +12,13 @@ [context.deploy-preview] command = "hugo -s exampleSite -b $DEPLOY_PRIME_URL" + +[[headers]] + for = "/*" + [headers.values] + Cache-Control = "public, max-age=600" + +[[headers]] + for = "*.(css|js|woff|woff2|ttf|png|jpg|jpeg)" + [headers.values] + Cache-Control = "public, max-age=2592000"
\ No newline at end of file |
