diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3599ba1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +--- +name: Build + +on: + - push + - pull_request + +jobs: + build: + runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - uses: actions/checkout@v4 + with: + submodules: true + fetch-depth: 0 + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v3 + with: + hugo-version: "0.135.0" + extended: true + + - name: Cache + uses: actions/cache@v4 + with: + path: /tmp/hugo_cache + key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-hugomod- + + - name: Build + run: hugo --minify diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..86c95ef --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +# 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/LICENSE b/LICENSE new file mode 100644 index 0000000..8aa2645 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) [year] [fullname] + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/archetypes/default.md b/archetypes/default.md index fdccff8..c6f3fce 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,4 +1,5 @@ ---- -title: "{{ replace .Name "-" " " | title }}" -date: {{ .Date }} ---- ++++ +title = '{{ replace .File.ContentBaseName "-" " " | title }}' +date = {{ .Date }} +draft = true ++++ diff --git a/assets/css/main.css b/assets/css/main.css new file mode 100644 index 0000000..e0cc053 --- /dev/null +++ b/assets/css/main.css @@ -0,0 +1,84 @@ +:root { + --primary-color: #196680; + --secondary-color: #80dfff; + --alternative-color: #ff9b33; + --text-color: #222222; +} + +a { + color: var(--primary-color); +} + +.dark a { + color: var(--secondary-color); +} + +a:hover { + color: var(--alternative-color); +} + +h1, +h2, +h3 { + color: var(--primary-color); +} + +.dark h1, +.dark h2, +.dark h3 { + color: var(--secondary-color); +} + +.dark .pagination a { + color: var(--primary-color); +} + +body { + color: #222; + font-family: + Monaspace Argon, + sans-serif; + line-height: 1.5; + margin: 1rem; + max-width: 768px; +} + +header { + border-bottom: 1px solid #222; + margin-bottom: 1rem; +} + +footer { + border-top: 1px solid #222; + margin-top: 1rem; +} + +a { + color: #00e; + text-decoration: none; +} + +h1 { + font-family: + Optician Sans, + sans-serif; +} + +@font-face { + font-family: "Optician Sans"; + font-style: normal; + font-weight: 400; + src: url("/fonts/Optiker-K.woff") format("woff"); +} + +@font-face { + font-family: "Monaspace Radon"; + font-style: normal; + src: url("/fonts/MonaspaceRadon-Regular.woff") format("woff"); +} + +@font-face { + font-family: "Monaspace Argon"; + font-style: normal; + src: url("/fonts/MonaspaceArgon-Medium.woff") format("woff"); +} diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..e2aac52 --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1 @@ +console.log('This site was generated by Hugo.'); diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/exampleSite/content/_index.md b/exampleSite/content/_index.md deleted file mode 100644 index 0e6a35a..0000000 --- a/exampleSite/content/_index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Home" ---- - -# Hi there - -Welcome to your new Hugo site. - -Now go build something great. diff --git a/exampleSite/content/about/index.md b/exampleSite/content/about/index.md deleted file mode 100644 index 6f5bcdb..0000000 --- a/exampleSite/content/about/index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "About" ---- - -Here's a bit about me. diff --git a/exampleSite/content/posts/my-first-post.md b/exampleSite/content/posts/my-first-post.md deleted file mode 100644 index bc12660..0000000 --- a/exampleSite/content/posts/my-first-post.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: "My First Post" -date: 2020-09-03T17:27:59+07:00 ---- - -Here's an example blog post. diff --git a/exampleSite/hugo.toml b/exampleSite/hugo.toml deleted file mode 100644 index 5e67390..0000000 --- a/exampleSite/hugo.toml +++ /dev/null @@ -1,16 +0,0 @@ -baseURL = "https://mynewhugosite.com" -title = "My New Hugo Site" -theme = "hugo-starter" - -[menu] - [[menu.main]] - identifier = "posts" - name = "Posts" - url = "/posts" - weight = 10 - - [[menu.main]] - identifier = "about" - name = "About" - url = "/about" - weight = 20 diff --git a/hugo.toml b/hugo.toml index 5e67390..6c35bc4 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,16 +1,23 @@ -baseURL = "https://mynewhugosite.com" -title = "My New Hugo Site" -theme = "hugo-starter" +baseURL = 'https://example.org/' +languageCode = 'en-US' +title = 'My New Hugo Site' -[menu] - [[menu.main]] - identifier = "posts" - name = "Posts" - url = "/posts" - weight = 10 +[[menus.main]] +name = 'Home' +pageRef = '/' +weight = 10 - [[menu.main]] - identifier = "about" - name = "About" - url = "/about" - weight = 20 +[[menus.main]] +name = 'Posts' +pageRef = '/posts' +weight = 20 + +[[menus.main]] +name = 'Tags' +pageRef = '/tags' +weight = 30 + +[module] + [module.hugoVersion] + extended = false + min = "0.116.0" diff --git a/i18n/.gitkeep b/i18n/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/layouts/404.html b/layouts/404.html deleted file mode 100644 index 9b100d8..0000000 --- a/layouts/404.html +++ /dev/null @@ -1,9 +0,0 @@ -{{ partial "header.html" . }} - -
This page doesn't exist.
- - - -{{ partial "footer.html" . }} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..39dcbec --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,17 @@ + + + + {{ partial "head.html" . }} + + +