Browse Source

Merge branch 'develop' into 'master'

Deploy new hugo generated site to production

See merge request warricksothr/sothr-dot-com!1
master
Drew Short 6 years ago
parent
commit
075fc167af
  1. 26
      .gitignore
  2. 37
      .gitlab-ci.yml
  3. 30
      LICENSE
  4. 3
      README.md
  5. 2
      Setup.hs
  6. 6
      app/Main.hs
  7. 6
      archetypes/default.md
  8. 6
      archetypes/portfolio.md
  9. 27
      config.toml
  10. 13
      content/_index.md
  11. 11
      content/about/_index.md
  12. 7
      content/portfolio/_index.md
  13. 6
      content/portfolio/sothr-dot-com-website.md
  14. 6
      content/portfolio/visual-resume.md
  15. 43
      sothr-dot-com.cabal
  16. 6
      src/Data/String/Strip.hs
  17. BIN
      static/assets/img/github.png
  18. 37
      static/assets/img/gitlab.svg
  19. BIN
      static/assets/img/linkedin.png
  20. 19
      test/Data/String/StripSpec.hs
  21. 1
      test/Spec.hs
  22. 20
      themes/pure/LICENSE
  23. 2
      themes/pure/archetypes/default.md
  24. 5
      themes/pure/layouts/404.html
  25. 19
      themes/pure/layouts/_default/baseof.html
  26. 42
      themes/pure/layouts/_default/list.html
  27. 5
      themes/pure/layouts/_default/single.html
  28. 6
      themes/pure/layouts/index.html
  29. 5
      themes/pure/layouts/partials/footer.html
  30. 42
      themes/pure/layouts/partials/head.html
  31. 1
      themes/pure/layouts/partials/header.html
  32. 64
      themes/pure/static/assets/css/style.css
  33. 11
      themes/pure/static/assets/vendor/purecss/pure-min.css
  34. 21
      themes/pure/theme.toml

26
.gitignore

@ -1,25 +1 @@
# Created by .ignore support plugin (hsz.mobi)
### Haskell template
dist
dist-*
cabal-dev
*.o
*.hi
*.chi
*.chs.h
*.dyn_o
*.dyn_hi
.hpc
.hsenv
.cabal-sandbox/
cabal.sandbox.config
*.prof
*.aux
*.hp
*.eventlog
.stack-work/
cabal.project.local
.HTF/
*.iml
.idea/
public/

37
.gitlab-ci.yml

@ -0,0 +1,37 @@
stages:
- build
- deploy
build-website:
image: sothr.com/hugo:0.4.0
stage: build
script:
- hugo --theme pure --destination /output --baseURL https://sothr.com
- TARGET=$PWD
- tar -czvf website.tgz -C /output/ .
only:
- master
tags:
- linux
artifacts:
paths:
- website.tgz
deploy-website:
image: sothr.com/deploy:ubuntu
stage: deploy
variables:
TARGET_DIRECTORY: "/srv/www/sothr.com"
script:
- eval `ssh-agent -s`
- ssh-add <(echo "$SSH_DEPLOY_KEY")
- mkdir -p ~/.ssh
- ssh-keyscan -p $DEPLOY_PORT sothr.com >> ~/.ssh/known_hosts
- mkdir /tmp/deploy
- tar -xvf website.tgz -C /tmp/deploy
- rsync -avz --delete-delay -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -p $DEPLOY_PORT" --progress /tmp/deploy/* $DEPLOY_USER@$DEPLOY_HOST:$TARGET_DIRECTORY
only:
- master
tags:
- docker
environment: production

30
LICENSE

@ -1,30 +0,0 @@
Copyright Drew Short (c) 2017
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Author name here nor the names of other
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

3
README.md

@ -1,3 +0,0 @@
# sothr-dot-com
add description of sothr-dot-com here

2
Setup.hs

@ -1,2 +0,0 @@
import Distribution.Simple
main = defaultMain

6
app/Main.hs

@ -1,6 +0,0 @@
module Main where
import Data.String.Strip
main :: IO ()
main = interact strip

6
archetypes/default.md

@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

6
archetypes/portfolio.md

@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
category: "ChangeMe"
---

27
config.toml

@ -0,0 +1,27 @@
baseURL = "https://sothr.com/"
languageCode = "en-us"
title = "Sothr"
theme = "pure"
[params]
CopyrightHolder = "Drew Short"
CopyrightYear = "2014"
[params.links]
[params.links.resume]
weight = 10
title = "Résumé"
url = "https://sothr.com/resume/"
[params.links.gitlab]
weight = 2
title = "GitLab"
image = "assets/img/gitlab.svg"
url = "https://gitlab.com/WarrickSothr"
[params.links.github]
weight = 1
title = "GitHub"
image = "assets/img/github.png"
url = "https://github.com/warricksothr/"
[params.links.linkedin]
title = "LinkedIn"
image = "assets/img/linkedin.png"
url = "https://www.linkedin.com/in/drew-short-5188033a/"

13
content/_index.md

@ -0,0 +1,13 @@
---
draft: false
type: "homepage"
---
Welcome to my personal landing page.
I'm a backend and middlware software engineer with a strong focus on the JVM and the surrounding ecosystem. I've spent the last few years working on a suite of services for the healthcare platform at [Optum, Inc.](https://www.optum.com/) I have 7+ years of experience with Java, the Spring Framework and the myriad of libraries that facilitate SOA and Microservice applications.
In my personal projects I often steer clear of the JVM as I work with it on a daily basis during the work week. My tools of choice outside of work are [Python](https://www.python.org/) and [Rust](https://www.rust-lang.org/), with a sprinkling of [Go](https://golang.org/) and the occasional foray into [Common Lisp](https://en.wikipedia.org/wiki/Common_Lisp) or [Racket](https://racket-lang.org/). A lot of my personal projects end up on my internally deployed [GitLab](https://about.gitlab.com/) instance and I find the integrated CI suite to be particularly useful. In fact, this site is built on that system and deployed automatically when changes are made to the underlying git repository.
This site is hosted on a small [Digital Ocean](https://www.digitalocean.com/) droplet that I personally manage. While the majority of my personal projects that run as services are hosted as docker containers on my homelab server or on a mediocre dedicated server I rent from [nocix.net](https://www.nocix.net/).
I don't spend much time writing, but when I do feel the itch I'll often drop a piece of content at my old [blog](http://blog.sothr.com) or at the new NullOctet [blog](https://blog.nulloctet.com)

11
content/about/_index.md

@ -0,0 +1,11 @@
---
title: "About"
draft: false
type: "navLink"
weight: 1
---
[**sothr.com**](https://sothr.com) is in it's 3rd iteration, rewritten using the static site generator [Hugo](https://gohugo.io/) from the previous Refinery CMS branch. I don't update the site often enough to require a CMS style site, and I am no longer comfortable with the additional attack surface of such an application for a simple personal landing page. I've developed a custom Hugo theme based on [Pure.css](https://purecss.io/) which I find to be a refreshingly small css only layout library.
The second edition was built on [Refinery CMS](https://refinerycms.com/) and was birthed from my rediscovery of the ruby language while automating processes at Cargill. I was growing tired of maintaining a hand written HTML5 site, and regularly updating my personal project lists wasn't doing anything good for my frustrations around the state of HTML5, CSS3 and Javascript. This version did inherit the look of the original site, through my thankfully forward looking design choice of using mostly stock bootstrap as the primary css library.
The very first edition of the site was a custom amalgamation of burdening web technologies with Javascript at the core. I spun out the core components and called it [Web-App-Seed](https://github.com/warricksothr/Web-App-Seed), though this specific set of tools never saw much use and the site built with them was overly complicated. It did however have one meaningful impact on my designs, the use of CSS libraries like [bootstrap](https://getbootstrap.com/docs/3.4/) to help with page layout.

7
content/portfolio/_index.md

@ -0,0 +1,7 @@
---
title: "Portfolio"
draft: false
type: "navLink"
weight: 10
---
The following are projects of mine that I've collected and written about

6
content/portfolio/sothr-dot-com-website.md

@ -0,0 +1,6 @@
---
title: "Sothr.com Website"
date: 2019-02-09T02:47:12-06:00
draft: true
category: "Personal Project"
---

6
content/portfolio/visual-resume.md

@ -0,0 +1,6 @@
---
title: "Visual Resume"
date: 2019-02-09T04:01:13-06:00
draft: true
category: "Personal Project"
---

43
sothr-dot-com.cabal

@ -1,43 +0,0 @@
name: sothr-dot-com
version: 0.1.0.0
-- synopsis:
-- description:
homepage: https://github.com/githubuser/sothr-dot-com#readme
license: BSD3
license-file: LICENSE
author: Author name here
maintainer: example@example.com
copyright: 2017 Author name here
category: Web
build-type: Simple
extra-source-files: README.md
cabal-version: >=1.10
library
hs-source-dirs: src
exposed-modules: Data.String.Strip
build-depends: base >= 4.7 && < 5
default-language: Haskell2010
executable sothr-dot-com
hs-source-dirs: app
main-is: Main.hs
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends: base
, sothr-dot-com
default-language: Haskell2010
test-suite sothr-dot-com-test
type: exitcode-stdio-1.0
hs-source-dirs: test
main-is: Spec.hs
build-depends: base
, sothr-dot-com
, hspec
, QuickCheck
ghc-options: -threaded -rtsopts -with-rtsopts=-N
default-language: Haskell2010
source-repository head
type: git
location: https://github.com/githubuser/sothr-dot-com

6
src/Data/String/Strip.hs

@ -1,6 +0,0 @@
module Data.String.Strip (strip) where
import Data.Char
strip :: String -> String
strip = dropWhile isSpace . reverse . dropWhile isSpace . reverse

BIN
static/assets/img/github.png

After

Width: 128  |  Height: 128  |  Size: 2.2 KiB

37
static/assets/img/gitlab.svg

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 54 54" style="enable-background:new 0 0 54 54;" xml:space="preserve">
<style type="text/css">
.st0{fill:none;}
</style>
<g>
<rect x="-0.2" y="0.1" class="st0" width="53.8" height="53.4"/>
<path d="M26.6,49.3L2.4,31.7c-0.3-0.2-0.6-0.6-0.7-1c-0.1-0.4-0.1-0.8,0-1.2L4.5,21L26.6,49.3z M11.9,3.9L17.4,21H4.5l5.5-17.1
c0.1-0.4,0.5-0.6,0.9-0.6C11.5,3.2,11.8,3.5,11.9,3.9z M17.4,21h18.4l-9.2,28.3L17.4,21z M51.6,29.6c0.1,0.4,0.1,0.8,0,1.2
c-0.1,0.4-0.4,0.7-0.7,1L26.6,49.3L48.7,21L51.6,29.6z M48.7,21H35.9l5.5-17.1c0.1-0.4,0.5-0.6,0.9-0.6c0.5,0,0.8,0.2,0.9,0.6
L48.7,21z"/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

BIN
static/assets/img/linkedin.png

After

Width: 256  |  Height: 256  |  Size: 3.9 KiB

19
test/Data/String/StripSpec.hs

@ -1,19 +0,0 @@
module Data.String.StripSpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
import Data.String.Strip
-- `main` is here so that this module can be run from GHCi on its own. It is
-- not needed for automatic spec discovery.
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "strip" $ do
it "removes leading and trailing whitespace" $ do
strip "\t foo bar\n" `shouldBe` "foo bar"
it "is idempotent" $ property $
\str -> strip str === strip (strip str)

1
test/Spec.hs

@ -1 +0,0 @@
{-# OPTIONS_GHC -F -pgmF hspec-discover #-}

20
themes/pure/LICENSE

@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2019 YOUR_NAME_HERE
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.

2
themes/pure/archetypes/default.md

@ -0,0 +1,2 @@
+++
+++

5
themes/pure/layouts/404.html

@ -0,0 +1,5 @@
{{ define "main" }}
<h1>Page not found</h1>
I'm sorry, but the requested page wasn’t found on the server.
{{ end }}

19
themes/pure/layouts/_default/baseof.html

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
{{- partial "head.html" . -}}
<body>
<div id="header">
{{- partial "header.html" . -}}
</div>
<div id="content" class="pure-g">
<div class="pure-u-1-5"></div>
<div class="pure-u-3-5">
{{- block "main" . }}{{- end }}
</div>
<div class="pure-u-1-5"></div>
</div>
<div id="footer">
{{- partial "footer.html" . -}}
</div>
</body>
</html>

42
themes/pure/layouts/_default/list.html

@ -0,0 +1,42 @@
{{ define "main" }}
<h1>{{.Title}}</h1>
<div>
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
{{.Content}}
</div>
{{ $has_categories := gt (len (first 1 (where .Pages ".Params.category" "ne" nil))) 0 }}
{{ $has_without_categories := gt (len (first 1 (where .Pages ".Params.category" "eq" nil))) 0 }}
<!-- Ranges through content/posts/*.md -->
{{ if $has_categories }}
{{ range .Pages.GroupByParam "Category" }}
<div class="pure-g">
<div class="pure-u-1">
{{ if .Key }}
<h2>{{ .Key }}</h2>
{{ end }}
{{ range .Pages }}
<div class="pure-g">
<div class="pure-u-1">
<a href="{{.Permalink}}">{{.Title}}</a>
</div>
</div>
{{ end }}
</div>
</div>
{{ end }}
{{ end }}
{{ if and $has_categories $has_without_categories }}
<div class="pure-g">
<div class="pure-u-1">
<h2>Others:</h2>
</div>
</div>
{{ end }}
{{ range where .Pages ".Params.category" "==" nil }}
<div class="pure-g">
<div class="pure-u-1">
<a href="{{.Permalink}}">{{.Date.Format "2006-01-02"}} | {{.Title}}</a>
</div>
</div>
{{ end }}
{{ end }}

5
themes/pure/layouts/_default/single.html

@ -0,0 +1,5 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ end }}

6
themes/pure/layouts/index.html

@ -0,0 +1,6 @@
{{ define "main" }}
{{ range where .Site.Pages "Type" "homepage" }}
<h1>{{ .Title }}</h1>
{{ .Content }}
{{ end }}
{{ end }}

5
themes/pure/layouts/partials/footer.html

@ -0,0 +1,5 @@
<div class="pure-g">
<div class="pure-u-1 text-align-right" style="padding-right: 1em;">
<span>&copy;</span> {{ .Site.Params.CopyrightYear }} - Present &nbsp; {{ .Site.Params.CopyrightHolder }} &nbsp; ALL RIGHTS RESERVED.
</div>
</div>

42
themes/pure/layouts/partials/head.html

@ -0,0 +1,42 @@
<head {{ with .Site.LanguageCode }}lang="{{ . }}"{{ end }}>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
{{ with .Site.Params.description -}}
<meta name="description" content="{{ . }}">
{{- end }}
{{ .Hugo.Generator }}
<title>{{ if not .IsHome }}{{ .Title }} &mdash;{{ end }} {{ .Site.Title }}</title>
<link rel="stylesheet" href="{{ .Site.BaseURL }}assets/vendor/purecss/pure-min.css" type="text/css" />
<link rel="stylesheet" href="{{ .Site.BaseURL }}assets/css/style.css" type="text/css" />
</head>
<nav>
<div class="pure-menu pure-menu-horizontal">
<ul class="pure-menu-list float-left">
<li class="pure-menu-list">
<a href="{{ .Site.BaseURL }}" class="pure-menu-heading pure-menu-link" title="Home">{{ .Site.Title }}</a>
</li>
{{ range where (sort .Site.Pages "Weight" "desc") "Type" "navLink"}}
<li class="pure-menu-list"><a href="{{ .URL }}" class="pure-menu-link" title="{{ .Title }}">{{ .Title }}</a></li>
{{ end }}
</ul>
<ul class="pure-menu-list float-right">
{{ range sort .Site.Params.links "weight" "desc" }}
<li class="pure-menu-list">
{{ if .image }}
<a href="{{ .url }}" target="_blank" title="{{ .title }}">
<img src="{{ .image | absURL }}" />
</a>
{{ else }}
<a href="{{ .url }}" target="_blank" class="pure-menu-link" title="{{ .title }}">
{{ .title }}
</a>
{{ end }}
</a>
</li>
{{ end }}
</ul>
</div>
</nav>

1
themes/pure/layouts/partials/header.html

@ -0,0 +1 @@

64
themes/pure/static/assets/css/style.css

@ -0,0 +1,64 @@
nav {
overflow: hidden;
padding: 0px 0px;
background: #E7732F;
height: 2.2em;
}
nav ul {
display: block;
}
nav ul li {
display: block;
float: left;
padding-left: 1em;
}
nav ul li a img {
padding: .1em .2em;
width: 1.9em;
}
nav ul li a img:hover {
background: #ffffff;
}
#container {
min-height: 100%;
position: relative;
}
#body {
padding: 10px;
padding-bottom: 2em; /* Height of the footer */
}
#footer {
position: absolute;
bottom: 0;
width: 100%;
height: 2em; /* Height of the footer */
}
.float-left {
float: left;
}
.float-right {
float: right;
}
.text-align-right {
text-align: right;
}
.pure-menu-link {
color: #000000;
}
.pure-menu-active>.pure-menu-link,
.pure-menu-link:focus,
.pure-menu-link:hover {
background-color:#ffffff
}

11
themes/pure/static/assets/vendor/purecss/pure-min.css
File diff suppressed because it is too large
View File

21
themes/pure/theme.toml

@ -0,0 +1,21 @@
# theme.toml template for a Hugo theme
# See https://github.com/gohugoio/hugoThemes#themetoml for an example
name = "Pure"
license = "MIT"
licenselink = "https://github.com/yourname/yourtheme/blob/master/LICENSE"
description = ""
homepage = "http://sothr.com/"
tags = []
features = []
min_version = "0.41"
[author]
name = "Drew Short"
homepage = "https://sothr.com"
# If porting an existing theme
[original]
name = ""
homepage = ""
repo = ""