commit f983b6ec3c01eca57d6b55e96e985e61babd3a30 Author: Gabriel Augendre Date: Fri May 12 10:28:26 2023 +0200 Initial commit diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml new file mode 100644 index 0000000..38e3632 --- /dev/null +++ b/.github/workflows/hugo.yaml @@ -0,0 +1,79 @@ +# Sample workflow for building and deploying a Hugo site to GitHub Pages +name: Deploy Hugo site to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: + - main + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +# Default to bash +defaults: + run: + shell: bash + +jobs: + # Build job + build: + runs-on: ubuntu-latest + env: + HUGO_VERSION: 0.111.3 + steps: + - name: Install Hugo CLI + run: | + wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ + && sudo dpkg -i ${{ runner.temp }}/hugo.deb + - name: Install Dart Sass Embedded + run: sudo snap install dart-sass-embedded + - name: Checkout + uses: actions/checkout@v3 + with: + submodules: recursive + fetch-depth: 0 + - name: Setup Pages + id: pages + uses: actions/configure-pages@v3 + - name: Install Node.js dependencies + run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" + - name: Build with Hugo + env: + # For maximum backward compatibility with Hugo modules + HUGO_ENVIRONMENT: production + HUGO_ENV: production + run: | + hugo \ + --gc \ + --minify \ + --baseURL "${{ steps.pages.outputs.base_url }}/" + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: ./public + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2a8645f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.hugo_build.lock diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..89af1b0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/PaperMod"] + path = themes/PaperMod + url = https://github.com/adityatelange/hugo-PaperMod.git diff --git a/README.md b/README.md new file mode 100644 index 0000000..387c367 --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# hugo-blog + +This is the repository for my blog, managed by hugo. + +This repo uses submodules: +```shell +git clone ... +git submodule update --init --recursive +``` + diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/archetypes/posts.md b/archetypes/posts.md new file mode 100644 index 0000000..a0b146b --- /dev/null +++ b/archetypes/posts.md @@ -0,0 +1,39 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +# weight: 1 +# aliases: ["/first"] +tags: [] + +author: "Gabriel Augendre" +# author: ["Me", "You"] # multiple authors +showToc: true +TocOpen: false +hidemeta: false +comments: false +description: "Desc Text." +canonicalURL: "https://canonical.url/to/page" +disableHLJS: true # to disable highlightjs +disableShare: false +disableHLJS: false +hideSummary: false +searchHidden: true +ShowReadingTime: true +ShowBreadCrumbs: true +ShowPostNavLinks: true +ShowWordCount: true +ShowRssButtonInSectionTermList: true +UseHugoToc: true +cover: + image: "" # image path/url + alt: "" # alt text + caption: "" # display caption under cover + relative: false # when using page bundles set this to true + hidden: true # only hide on current single page +editPost: + URL: "https://github.com//content" + Text: "Suggest Changes" # edit text + appendFilePath: true # to append file path to Edit link +--- + diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..526ba60 --- /dev/null +++ b/config.yaml @@ -0,0 +1,132 @@ +baseURL: "https://gabnotes.org" +title: "Gab's Notes" +paginate: 10 +theme: "PaperMod" + +languageCode: "en-us" + +enableRobotsTXT: true +buildDrafts: false +buildFuture: false +buildExpired: false + +minify: + disableXML: true + minifyOutput: true + +params: + env: production # to enable google analytics, opengraph, twitter-cards and schema. + title: "Gab's Notes" + description: "My take on tech-related subjects (but not only)." + keywords: [Blog] + author: "Gabriel Augendre" + # author: ["Me", "You"] # multiple authors + images: [""] + DateFormat: "2006-01-02" + defaultTheme: auto # dark, light + disableThemeToggle: false + + ShowReadingTime: true + ShowShareButtons: true + ShowPostNavLinks: true + ShowBreadCrumbs: true + ShowCodeCopyButtons: false + ShowWordCount: true + ShowRssButtonInSectionTermList: true + UseHugoToc: true + disableSpecial1stPost: false + disableScrollToTop: false + comments: false + hidemeta: false + hideSummary: false + showtoc: false + tocopen: false + + assets: + # disableHLJS: true # to disable highlight.js + # disableFingerprinting: true + favicon: "" + favicon16x16: "" + favicon32x32: "" + apple_touch_icon: "" + safari_pinned_tab: "" + + label: + text: "Home" + icon: /apple-touch-icon.png + iconHeight: 35 + + # profile-mode + profileMode: + enabled: false # needs to be explicitly set + title: ExampleSite + subtitle: "This is subtitle" + imageUrl: "" + imageWidth: 120 + imageHeight: 120 + imageTitle: my image + buttons: + - name: Posts + url: posts + - name: Tags + url: tags + + # home-info mode + homeInfoParams: + Title: "Hi there \U0001F44B" + Content: Welcome to my blog + + socialIcons: + - name: stackoverflow + url: "https://stackoverflow.com" + - name: github + url: "https://github.com/" + - name: mastodon + url: "https://fosstodon.org/@Crocmagnon" + + cover: + hidden: true # hide everywhere but not in structured data + hiddenInList: true # hide on list pages and home + hiddenInSingle: true # hide on single page + + editPost: + URL: "https://github.com//content" + Text: "Suggest Changes" # edit text + appendFilePath: true # to append file path to Edit link + + # for search + # https://fusejs.io/api/options.html + fuseOpts: + isCaseSensitive: false + shouldSort: true + location: 0 + distance: 1000 + threshold: 0.4 + minMatchCharLength: 0 + keys: ["title", "permalink", "summary", "content"] +menu: + main: + - identifier: categories + name: categories + url: /categories/ + weight: 10 + - identifier: tags + name: tags + url: /tags/ + weight: 20 + - identifier: example + name: example.org + url: https://example.org + weight: 30 +# Read: https://github.com/adityatelange/hugo-PaperMod/wiki/FAQs#using-hugos-syntax-highlighter-chroma +pygmentsUseClasses: true +markup: + highlight: + noClasses: false + # anchorLineNos: true + # codeFences: true + # guessSyntax: true + # lineNos: true + # style: monokai + + diff --git a/content/posts/hello-hugo.md b/content/posts/hello-hugo.md new file mode 100644 index 0000000..b15491b --- /dev/null +++ b/content/posts/hello-hugo.md @@ -0,0 +1,44 @@ +--- +title: "Hello Hugo" +date: 2023-05-12T10:14:52+02:00 +draft: true +# weight: 1 +# aliases: ["/first"] +tags: [] + +author: "Gabriel Augendre" +# author: ["Me", "You"] # multiple authors +showToc: true +TocOpen: false +hidemeta: false +comments: false +description: "Desc Text." +canonicalURL: "https://canonical.url/to/page" +disableHLJS: true # to disable highlightjs +disableShare: false +disableHLJS: false +hideSummary: false +searchHidden: true +ShowReadingTime: true +ShowBreadCrumbs: true +ShowPostNavLinks: true +ShowWordCount: true +ShowRssButtonInSectionTermList: true +UseHugoToc: true +cover: + image: "" # image path/url + alt: "" # alt text + caption: "" # display caption under cover + relative: false # when using page bundles set this to true + hidden: true # only hide on current single page +editPost: + URL: "https://github.com//content" + Text: "Suggest Changes" # edit text + appendFilePath: true # to append file path to Edit link +--- + +## Hello world + +This is an introduction post using **hugo**, a SSG written in *golang*. + + diff --git a/themes/PaperMod b/themes/PaperMod new file mode 160000 index 0000000..bacb763 --- /dev/null +++ b/themes/PaperMod @@ -0,0 +1 @@ +Subproject commit bacb763071d9852bb719675e6c4452fc5650a193