From 85778d763afcf17ecca9934ce660bbfc5488ab08 Mon Sep 17 00:00:00 2001 From: Adam Veldhousen Date: Wed, 1 Jan 2020 18:10:31 -0600 Subject: [PATCH] remove artifacts --- .gitignore | 1 + Dockerfile | 31 ++----------------- Dockerfile.dev | 29 +++++++++++++++++ assets/css/layout.scss | 5 +++ assets/css/list.scss | 13 ++++++-- .../posts/git-tips-global-precommit-hook.md | 15 +++++---- layouts/partials/tags.html | 2 +- makefile | 7 +++-- public/categories/index.xml | 14 --------- public/index.xml | 14 --------- public/sitemap.xml | 17 ---------- public/tags/index.xml | 14 --------- 12 files changed, 60 insertions(+), 102 deletions(-) create mode 100644 Dockerfile.dev delete mode 100644 public/categories/index.xml delete mode 100644 public/index.xml delete mode 100644 public/sitemap.xml delete mode 100644 public/tags/index.xml diff --git a/.gitignore b/.gitignore index 8b4bda0..3eec6c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ resources +public diff --git a/Dockerfile b/Dockerfile index 280078f..71b0eda 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,29 +1,2 @@ -FROM debian:bullseye-slim - - -ARG VERSION=0.59.1 - -WORKDIR /tmp -RUN apt-get update \ - && apt-get install -y tar curl ca-certificates python3 python-pip \ - && apt-get clean \ - && pip install Pygments \ - && curl https://github.com/gohugoio/hugo/releases/download/v${VERSION}/hugo_extended_${VERSION}_Linux-64bit.tar.gz -L | tar -xvz \ - && mv /tmp/hugo /usr/local/bin/hugo \ - && rm -rf /tmp/* - -RUN useradd -m -u 1000 -U -p '' -s /bin/bash hugo \ - && mkdir -p /opt/workdir \ - && chown -R 1000:1000 /home/hugo /opt/workdir /usr/local/bin/hugo - -USER hugo - -WORKDIR /opt/workdir - -VOLUME /opt/workdir - -EXPOSE 1313 - -ENTRYPOINT /usr/local/bin/hugo - -CMD ["--help"] +FROM nginx +COPY ./public /usr/share/nginx/html \ No newline at end of file diff --git a/Dockerfile.dev b/Dockerfile.dev new file mode 100644 index 0000000..280078f --- /dev/null +++ b/Dockerfile.dev @@ -0,0 +1,29 @@ +FROM debian:bullseye-slim + + +ARG VERSION=0.59.1 + +WORKDIR /tmp +RUN apt-get update \ + && apt-get install -y tar curl ca-certificates python3 python-pip \ + && apt-get clean \ + && pip install Pygments \ + && curl https://github.com/gohugoio/hugo/releases/download/v${VERSION}/hugo_extended_${VERSION}_Linux-64bit.tar.gz -L | tar -xvz \ + && mv /tmp/hugo /usr/local/bin/hugo \ + && rm -rf /tmp/* + +RUN useradd -m -u 1000 -U -p '' -s /bin/bash hugo \ + && mkdir -p /opt/workdir \ + && chown -R 1000:1000 /home/hugo /opt/workdir /usr/local/bin/hugo + +USER hugo + +WORKDIR /opt/workdir + +VOLUME /opt/workdir + +EXPOSE 1313 + +ENTRYPOINT /usr/local/bin/hugo + +CMD ["--help"] diff --git a/assets/css/layout.scss b/assets/css/layout.scss index b11735e..cd34291 100644 --- a/assets/css/layout.scss +++ b/assets/css/layout.scss @@ -12,6 +12,11 @@ h1, h2, h3 { font-size: 12pt; + margin: 0 0 10px 0; +} + +p { + margin: 0 0 10px 0; } .container { diff --git a/assets/css/list.scss b/assets/css/list.scss index 807748b..d8466c3 100644 --- a/assets/css/list.scss +++ b/assets/css/list.scss @@ -3,18 +3,27 @@ display: flex; list-style-type: none; padding: 0; + margin: 0 0 10px 0; li { margin-right: 5px; - background-color: black; + //background-color: black; padding: 0 5px; border-radius: 5px; + + a { + text-decoration: none; + &:hover { + text-decoration: underline; + text-decoration-color: #cb4b16; + } + } } } p code { background-color: #1c1c1c; - color: #a31515; + color: #f73b3b; } .postdate { diff --git a/content/posts/git-tips-global-precommit-hook.md b/content/posts/git-tips-global-precommit-hook.md index b538488..b58c1ce 100755 --- a/content/posts/git-tips-global-precommit-hook.md +++ b/content/posts/git-tips-global-precommit-hook.md @@ -6,16 +6,15 @@ tags: [git, testing, bash] [Git hooks][1] are a feature of the Git VCS that allow you to fire off custom logic on the client side when you take actions in your repository. These are shell scripts in the `.git/hooks/` directory of your repository, but they can also - exist at `~/.githooks/`. + exist in your home directory at `~/.githooks/`. -Any hooks found in `~/.githooks/` are executed globally for the user of that shell, this makes it awesome for running a - custom workflow that is consistent across your entire machine. +Any hooks found in `~/.githooks/` are executed globally, this makes it easy to setup a custom workflow that is consistent +across your entire machine. -## Useful hooks - -My favorite hook that I'm running these days is a `~/.githooks/pre-commit` hook that auto runs tests and lint commands -if they're found. +## Automatically lint and test on commit +One of my favorite hooks is a `~/.githooks/pre-commit` hook that auto runs test and lint commands from a `makefile` or +`package.json` if they're found: ```sh {{}} @@ -41,6 +40,6 @@ fi If the test or lint command fails then the `git commit` command fails. If I absolutely need to commit something in spite -of the lint/test results failing I can do `git commit --no-verify` to skip the `pre-commit` hook. +of the lint/test results I can do `git commit --no-verify` to skip the `pre-commit` hook. [1]: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks "Git hooks" diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html index 6d06b74..dfc8436 100644 --- a/layouts/partials/tags.html +++ b/layouts/partials/tags.html @@ -3,7 +3,7 @@ {{ range .Param $taxo }} {{ $name := . }} {{ with $.Site.GetPage (printf "/%s/%s" $taxo ($name | urlize)) }} -
  • {{ $name }}
  • +
  • #{{ $name }}
  • {{ end }} {{ end }} \ No newline at end of file diff --git a/makefile b/makefile index 9488d42..820d937 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,4 @@ -.PHONY: docker-build serve write +.PHONY: docker-build-dev serve write write: serve @@ -9,8 +9,9 @@ hugo: go get -u --tags extended -v github.com/gohugoio/hugo go install --tags extended -v github.com/gohugoio/hugo -docker-build: - docker build --build-arg='VERSION=0.59.1' -t hugo . +docker-build-dev: + docker build --build-arg='VERSION=0.59.1' -t hugo -f Dockerfile.dev . serve: ./hugo server -D -w --bind 0.0.0.0 + diff --git a/public/categories/index.xml b/public/categories/index.xml deleted file mode 100644 index 10c6ff4..0000000 --- a/public/categories/index.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - Categories on Adam's blog - https://vdhsn.com/categories/ - Recent content in Categories on Adam's blog - Hugo -- gohugo.io - en-us - - - - - - \ No newline at end of file diff --git a/public/index.xml b/public/index.xml deleted file mode 100644 index 69305f3..0000000 --- a/public/index.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - Adam's blog - https://vdhsn.com/ - Recent content on Adam's blog - Hugo -- gohugo.io - en-us - - - - - - \ No newline at end of file diff --git a/public/sitemap.xml b/public/sitemap.xml deleted file mode 100644 index 0fdfe09..0000000 --- a/public/sitemap.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - https://vdhsn.com/ - - - - https://vdhsn.com/categories/ - - - - https://vdhsn.com/tags/ - - - \ No newline at end of file diff --git a/public/tags/index.xml b/public/tags/index.xml deleted file mode 100644 index 2681814..0000000 --- a/public/tags/index.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - Tags on Adam's blog - https://vdhsn.com/tags/ - Recent content in Tags on Adam's blog - Hugo -- gohugo.io - en-us - - - - - - \ No newline at end of file