Skip to content
Permalink
Browse files

site working?

  • Loading branch information
wroscoe committed Dec 25, 2019
1 parent ad8de4f commit 76a388794a0acb246d64fa8c25ffff2571a4a0f7
Showing with 117 additions and 2,901 deletions.
  1. 0 .gitmodules
  2. +9 −21 Dockerfile
  3. +16 −6 Makefile
  4. +4 −1 README.md
  5. +3 −0 cloudbuild/https_redirect/Dockerfile
  6. +1 −0 cloudbuild/https_redirect/README.md
  7. +4 −0 cloudbuild/https_redirect/nginx.conf
  8. +7 −0 cloudbuild/hugo/Dockerfile
  9. +11 −0 cloudbuild/hugo/cloudbuild.yaml
  10. +1 −1 config.yaml
  11. +4 −2 content/_index.md
  12. +2 −2 content/docs/about.md
  13. +2 −2 content/docs/projects/donkeycar.md
  14. +0 −53 content/docs/yearly-recommendations.md
  15. +3 −5 content/menu/index.md
  16. +0 −2 content/posts/2019/2019-recommendations.md
  17. +0 −9 nginxdocker.txt
  18. +1 −1 resources/_gen/assets/scss/book.scss_50fc8c04e12a2f59027287995557ceff.content
  19. +1 −1 resources/_gen/assets/scss/book.scss_50fc8c04e12a2f59027287995557ceff.json
  20. +37 −0 themes/book/assets/_custom.scss
  21. +0 −3 themes/book/exampleSite/assets/_custom.scss
  22. +0 −3 themes/book/exampleSite/assets/_variables.scss
  23. +0 −74 themes/book/exampleSite/config.toml
  24. +0 −71 themes/book/exampleSite/config.yaml
  25. +0 −79 themes/book/exampleSite/content.cn/_index.md
  26. +0 −79 themes/book/exampleSite/content.ru/_index.md
  27. +0 −77 themes/book/exampleSite/content/_index.md
  28. +0 −12 themes/book/exampleSite/content/docs/example/2nd/3rd/4th.md
  29. +0 −26 themes/book/exampleSite/content/docs/example/2nd/3rd/_index.md
  30. +0 −23 themes/book/exampleSite/content/docs/example/2nd/_index.md
  31. +0 −71 themes/book/exampleSite/content/docs/example/_index.md
  32. +0 −52 themes/book/exampleSite/content/docs/example/hidden.md
  33. +0 −85 themes/book/exampleSite/content/docs/example/table-of-contents/_index.md
  34. +0 −64 themes/book/exampleSite/content/docs/example/table-of-contents/with-toc.md
  35. +0 −59 themes/book/exampleSite/content/docs/example/table-of-contents/without-toc.md
  36. +0 −3 themes/book/exampleSite/content/docs/shortcodes/_index.md
  37. +0 −13 themes/book/exampleSite/content/docs/shortcodes/buttons.md
  38. +0 −45 themes/book/exampleSite/content/docs/shortcodes/columns.md
  39. +0 −35 themes/book/exampleSite/content/docs/shortcodes/expand.md
  40. +0 −32 themes/book/exampleSite/content/docs/shortcodes/hints.md
  41. +0 −27 themes/book/exampleSite/content/docs/shortcodes/katex.md
  42. +0 −38 themes/book/exampleSite/content/docs/shortcodes/mermaid.md
  43. +0 −50 themes/book/exampleSite/content/docs/shortcodes/tabs.md
  44. +0 −21 themes/book/exampleSite/content/menu/index.md
  45. +0 −1,150 themes/book/exampleSite/content/posts/creating-a-new-theme.md
  46. +0 −344 themes/book/exampleSite/content/posts/goisforlovers.md
  47. +0 −89 themes/book/exampleSite/content/posts/hugoisforlovers.md
  48. +0 −156 themes/book/exampleSite/content/posts/migrate-from-jekyll.md
  49. +0 −1 ...es/book/exampleSite/resources/_gen/assets/scss/book.scss_50fc8c04e12a2f59027287995557ceff.content
  50. +0 −1 themes/book/exampleSite/resources/_gen/assets/scss/book.scss_50fc8c04e12a2f59027287995557ceff.json
  51. +3 −0 themes/book/layouts/docs/single.html
  52. +4 −4 themes/book/layouts/partials/docs/post-meta.html
  53. +1 −1 themes/book/layouts/posts/list.html
  54. +2 −2 themes/book/layouts/taxonomy/list.html
  55. +1 −5 themes/book/layouts/taxonomy/tag.html
No changes.
@@ -6,26 +6,14 @@ RUN apk add --no-cache \
openssh-client \
rsync

ENV VERSION 0.61.0
RUN mkdir -p /usr/local/src \
&& cd /usr/local/src \
&& curl -L https://github.com/gohugoio/hugo/releases/download/v${VERSION}/hugo_${VERSION}_linux-64bit.tar.gz | tar -xz \
&& mv hugo /usr/local/bin/hugo \
&& curl -L https://bin.equinox.io/c/dhgbqpS8Bvy/minify-stable-linux-amd64.tgz | tar -xz \
&& mv minify /usr/local/bin/ \
&& addgroup -Sg 1000 hugo \
&& adduser -SG hugo -u 1000 -h /src hugo
ENV VERSION 0.62.0
RUN apk add --no-cache git openssl py-pygments libc6-compat g++ curl
RUN curl -L https://github.com/gohugoio/hugo/releases/download/v${VERSION}/hugo_extended_${VERSION}_Linux-64bit.tar.gz | tar -xz \
&& cp hugo /usr/bin/hugo \
&& apk del curl \
&& hugo version

COPY ./ /src
WORKDIR /src
RUN hugo


FROM nginx:alpine

COPY ./conf/default.template /etc/nginx/conf.d/default.template

COPY --from=build /src/public /usr/share/nginx/html

# Substitute the environment variables and generate the final config
CMD envsubst < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'
EXPOSE 1313
WORKDIR /src
ENTRYPOINT [ "hugo" ]
@@ -1,10 +1,20 @@
IMAGE_NAME = gcr.io/wroscoe/blog:latest
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))

prod_build:
docker build -t ${IMAGE_NAME} -f Dockerfile .

prod_push: prod_build
docker push ${IMAGE_NAME}
hugo-image:
gcloud builds submit ./cloudbuild-hugo --config=./cloudbuild-hugo/cloudbuild.yaml

prod_deploy: prod_push
gcloud run deploy blog --image ${IMAGE_NAME} --platform managed --region us-central1
build-docker:
docker build -t $(IMAGE_NAME) .

site:
echo $(IMAGE_NAME)
echo $(ROOT_DIR)
docker run -p="1313:1313" -v $(ROOT_DIR):/src $(IMAGE_NAME)

server:
docker run -p="1313:1313" -v $(ROOT_DIR):/src $(IMAGE_NAME) server --bind="0.0.0.0"

deploy: site
gsutil -m rsync -r -c -d ./public/. gs://www.wroscoe.com
@@ -1,3 +1,6 @@
TODO:
- [ ] - move site tobe hosted on gcs, need to manage ssl https://stackoverflow.com/questions/22759710/setting-up-ssl-for-google-cloud-storage-static-website
- [ ] - automate build on commit
- [ ] - automate build on commit



@@ -0,0 +1,3 @@
FROM nginx:alpine

ADD ./nginx.conf /etc/nginx/conf.d/default.conf
@@ -0,0 +1 @@
from here: https://github.com/phpdocker-io/ssl-redirect
@@ -0,0 +1,4 @@
server {
listen 8080;
rewrite ^(.*) https://$host$1 permanent;
}
@@ -0,0 +1,7 @@
FROM busybox
ENV HUGO_VERSION=0.61.0
RUN wget -O- https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz | tar zx

FROM gcr.io/distroless/cc
ENTRYPOINT ["/hugo"]
COPY --from=0 /hugo /
@@ -0,0 +1,11 @@
# In this directory, run the following command to build this builder.
# $ gcloud builds submit . --config=cloudbuild.yaml

steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '--tag=gcr.io/${PROJECT_ID}/hugo', '.']
- name: 'gcr.io/${PROJECT_ID}/hugo'
args: ['--help']

images: ['gcr.io/${PROJECT_ID}/hugo']
tags: ['cloud-builders-community']
@@ -1,6 +1,6 @@
# hugo server --minify --themesDir ... --baseURL=http://0.0.0.0:1313/theme/hugo-book/

baseURL: https://wroscoe.com/
baseURL: https://www.wroscoe.com/
title: Will Roscoe
theme: book
#disableKinds: ["taxonomy", "taxonomyTerm"]
@@ -1,8 +1,10 @@
---
title: Will Roscoe's Notes on Life
title: Will Roscoe
type: docs
bookToc: false
---

Welcome to my notes on life. Learn more about me [here]({{< relref "/docs/about" >}}) and read my recent thoughts [here]({{< relref "/posts" >}}).
### Welcome to my notes on life.

* Learn more [about me.]({{< relref "/docs/about" >}})
* Read [my recent thoughts]({{< relref "/posts" >}}).
@@ -1,7 +1,7 @@
---
title: About Me
title: About
type: docs
slug: about-me
slug: about
bookToc: false
---

@@ -2,11 +2,11 @@
title: Donkey Car
type: docs
slug: donkeycar
tags:
- projects
bookToc: false
---

### Donkey Car

The Donkey Car is an opensource self driving 1/16th size car.


This file was deleted.

@@ -3,13 +3,11 @@ headless: true
bookMenuLevels: 1
---

- [**Blog**]({{< relref "/posts" >}})
<br />
- [Blog]({{< relref "/posts" >}})
- [About Me]({{< relref "/docs/about" >}})
- [Recomendations]({{< ref "/tags/recommendations" >}})
- [View Points]({{< relref "/docs/view-points" >}})

<br />
- **Projects**
- [DonkeyCar]({{< ref "/docs/projects/donkeycar" >}})

- [Projects]({{< ref "/tags/projects" >}})
-
@@ -9,8 +9,6 @@ weight: 10

2019 was another exciting year.

<!--more-->

## Movies
1. **First Man** - The epic tale of the initiative required to land on the moon. Watch with the sound turned to 11.
2. **Godzilla** - Who's not entertained by monsters that are healed with nuclear weapons.

This file was deleted.

Large diffs are not rendered by default.

@@ -1 +1 @@
{"Target":"book.min.8ee891d8dd34fb8b09309d336809d47b0da3d2b94b945845deb52a04253304a4.css","MediaType":"text/css","Data":{"Integrity":"sha256-juiR2N00+4sJMJ0zaAnUew2j0rlLlFhF3rUqBCUzBKQ="}}
{"Target":"book.min.30488fc08f3eff065dc9d80c76d683708a4fb40f11b33f7246b5d7927cde662d.css","MediaType":"text/css","Data":{"Integrity":"sha256-MEiPwI8+/wZdydgMdtaDcIpPtA8Rsz9yRrXXknzeZi0="}}
@@ -1,3 +1,40 @@
/* You can add custom styles here. */

// @import "plugins/numbered";
span.tag {
align-items: center;
background-color: #f5f5f5;
border-radius: 4px;
color: #4a4a4a;
display: inline-flex;
font-size: .75rem;
height: 2em;
justify-content: center;
line-height: 1.5;
padding-left: .75em;
padding-right: .75em;
white-space: nowrap;
}


.post-meta {
a:hover {
text-decoration: none;
}
span.date {
align-items: center;
color: #4a4a4a;
display: inline-flex;
font-size: .75rem;
height: 2em;
justify-content: center;
line-height: 1.5;
padding-left: 0em;
padding-right: .75em;
white-space: nowrap;
a {
color: grey;
}
}

}

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 76a3887

Please sign in to comment.
You can’t perform that action at this time.