From 848f6129ec7dac005cbe7b7c2a7e1772e01cf042 Mon Sep 17 00:00:00 2001 From: Jan Raasch Date: Wed, 9 Sep 2020 18:00:59 +0200 Subject: [PATCH] style: add & run prettier --- .github/FUNDING.yml | 4 +- .github/workflows/ci.yml | 32 +- .gitignore | 1 + .prettierignore | 6 + .prettierrc.json | 10 + README.md | 11 +- archetypes/homepage.md | 1 + exampleSite/content/homepage/about-me.md | 3 +- exampleSite/content/homepage/contact.md | 3 +- exampleSite/content/homepage/opener.md | 4 +- exampleSite/content/homepage/services.md | 3 +- exampleSite/content/services.md | 2 +- exampleSite/layouts/partials/custom_head.html | 20 +- layouts/404.html | 25 +- layouts/_default/baseof.html | 29 +- layouts/_default/single.html | 22 +- layouts/index.html | 1 - layouts/partials/footer.html | 23 +- layouts/partials/head.html | 31 +- package-lock.json | 20 + package.json | 29 + static/css/screen.css | 2110 +++++++++-------- static/js/icons.js | 507 +++- static/js/index.js | 216 +- 24 files changed, 1874 insertions(+), 1239 deletions(-) create mode 100644 .prettierignore create mode 100644 .prettierrc.json create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index ba257d5..3d62184 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,2 @@ -custom: ['https://www.paypal.me/janraasch/29,00'] -github: ['janraasch'] +custom: ["https://www.paypal.me/janraasch/29,00"] +github: ["janraasch"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e63ac2..54f0fe7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,30 +3,30 @@ name: CI on: push: branches: - - master + - master pull_request: branches: - - master + - master jobs: build: runs-on: ubuntu-18.04 steps: - - name: Checkout - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 - - name: Setup Hugo - uses: peaceiris/actions-hugo@v2 - with: - hugo-version: latest + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: latest - - name: Build local ./exampleSite - run: hugo --minify --gc --destination ../public --source ./exampleSite --themesDir ../.. --baseURL https://janraasch.github.io/hugo-scroll/ + - name: Build local ./exampleSite + run: hugo --minify --gc --destination ../public --source ./exampleSite --themesDir ../.. --baseURL https://janraasch.github.io/hugo-scroll/ - - name: Deploy to GitHub Pages - if: github.event_name == 'push' - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./public + - name: Deploy to GitHub Pages + if: github.event_name == 'push' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public diff --git a/.gitignore b/.gitignore index 2b66869..ea47378 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ public exampleSite/public +node_modules diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..9859f78 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,6 @@ +build +resources +public +static/font-awesome +static/css/normalize.css +layouts/index.html diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..c99d7d5 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,10 @@ +{ + "overrides": [ + { + "files": ["*.html"], + "options": { + "parser": "go-template" + } + } + ] +} diff --git a/README.md b/README.md index 33272d9..4d2411a 100644 --- a/README.md +++ b/README.md @@ -54,29 +54,30 @@ hugo new my-new-page.md ### Adding your branding / colors / css -Add a `custom_head.html`-file to your `layouts/partials`-directory. In there you may add a `