Skip to content

Commit

Permalink
Migrating from Jekyll to Hugo (#500)
Browse files Browse the repository at this point in the history
* Migrating from Jekyll to Hugo

* Fixing CircleCI config

Adding deploy job and reordering jobs

* Fixing book report margins

* Fixing lint-html job name

* Changing default font

* Reducing spacing above h3s

* Adjusting whitespace in CircleCI config

* Adjusting whitespace in CircleCI config again

* Adding check-whitespace and lint-markdown to deploy requirements

* Removing defaults from CircleCI config

* Removing stray 'defaults' line

* Switching to native syntax highlighting style
  • Loading branch information
mtlynch committed Jan 5, 2020
1 parent c0e054a commit d6dcc84
Show file tree
Hide file tree
Showing 701 changed files with 5,820 additions and 9,250 deletions.
3 changes: 0 additions & 3 deletions .babelrc

This file was deleted.

101 changes: 36 additions & 65 deletions .circleci/config.yml 100755 → 100644
@@ -1,113 +1,80 @@
defaults: &defaults
working_directory: ~/repo
version: 2.1
jobs:
check-whitespace:
<<: *defaults
docker:
- image: debian:jessie-20190228-slim
steps:
- checkout
- run:
name: Check for trailing whitespace
command: _tests/check-trailing-whitespace
minify-js:
<<: *defaults
command: tests/check-trailing-whitespace
lint-markdown:
docker:
- image: circleci/node:13.1.0-stretch
- image: mtlynch/markdownlint:0.8.0
steps:
- checkout
- run:
name: Install npm packages
command: npm install
- run:
name: Minify JavaScript
command: npm run build:js
- persist_to_workspace:
root: ./
paths:
- assets/js/main.min.js
name: Lint Markdown
command: tests/lint-markdown
build:
<<: *defaults
docker:
- image: circleci/ruby:2.6.5
environment:
# Keep in sync with save_cache path.
BUNDLE_PATH: ~/repo/_vendor/bundle
- image: peaceiris/hugo:v0.62.1
steps:
- checkout
- attach_workspace:
at: ./
- restore_cache:
keys:
- rubygems-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum "Gemfile.lock" }}
- rubygems-{{ .Environment.CIRCLE_CACHE_VERSION }}
- run:
name: Configure Bundler
name: Get submodules
command: |
echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
source $BASH_ENV
echo "BUNDLER_VERSION=${BUNDLER_VERSION}"
gem install bundler --version "$BUNDLER_VERSION"
- run:
name: Bundle Install
command: bundle check || bundle install
- run:
name: Lint frontmatter
command: _tests/lint-frontmatter
- run:
name: Lint Markdown
command: _tests/lint-markdown
- save_cache:
key: rubygems-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum "Gemfile.lock" }}
paths:
# Keep in sync with BUNDLE_PATH.
- ~/repo/_vendor/bundle
git submodule init
git submodule update --remote
- attach_workspace:
at: ./
- run:
name: Build prod site
command: ./_build_prod_site
- run:
name: Lint HTML
command: _tests/lint-html
command: hugo version && hugo
- persist_to_workspace:
root: ./
paths:
- _tests
- _site
- public
- tests
- firebase.json
- .firebaserc
lint-html:
docker:
- image: mtlynch/htmlproofer:3.15.0
steps:
- attach_workspace:
at: ./
- run:
name: Check HTML and external links
command: tests/lint-html
check-google-analytics-token:
<<: *defaults
docker:
- image: circleci/ruby:2.6.5
- image: circleci/golang:1.13
steps:
- attach_workspace:
at: ./
- run:
name: Check presence of Google Analytics token
command: _tests/check-google-analytics-token
command: tests/check-google-analytics-token
check-seo-metadata:
<<: *defaults
docker:
- image: circleci/ruby:2.6.5
- image: circleci/golang:1.13
steps:
- attach_workspace:
at: ./
- run:
name: Check that SEO meta tags rendered properly
command: _tests/check-seo-metadata
command: tests/check-seo-metadata
check-amazon-links:
<<: *defaults
docker:
- image: circleci/ruby:2.6.5
- image: circleci/golang:1.13
steps:
- attach_workspace:
at: ./
- run:
name: Check Amazon links
command: _tests/check-amazon-links
command: tests/check-amazon-links
deploy:
<<: *defaults
docker:
- image: circleci/node:13.1.0-stretch
steps:
Expand All @@ -125,10 +92,11 @@ workflows:
test-deploy:
jobs:
- check-whitespace
- minify-js
- build:
- lint-markdown
- build
- lint-html:
requires:
- minify-js
- build
- check-google-analytics-token:
requires:
- build
Expand All @@ -140,7 +108,10 @@ workflows:
- build
- deploy:
requires:
- check-whitespace
- lint-markdown
- build
- lint-html
- check-google-analytics-token
- check-seo-metadata
- check-amazon-links
Expand Down
22 changes: 3 additions & 19 deletions .gitignore
@@ -1,19 +1,3 @@
*.sublime-project
*.sublime-workspace
.DS_Store
Thumbs.db
.jekyll-metadata
.sass-cache
_asset_bundler_cache
_site
codekit-config.json
node_modules
npm-debug.log*
*.swp
*.swo
_*preview*
_update_date.py
assets/js/main.min.js
assets/js/script-compiled.js
images/resized/
@eaDir/
public/
resources/
.sw?
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "themes/hugo-coder"]
path = themes/hugo-coder
url = https://github.com/luizdepra/hugo-coder.git
1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

9 changes: 0 additions & 9 deletions .prettierrc.json

This file was deleted.

4 changes: 0 additions & 4 deletions .vscode/settings.json

This file was deleted.

2 changes: 1 addition & 1 deletion COPYRIGHT
@@ -1 +1 @@
Copyright (c) 2017 Michael Lynch. All rights reserved.
Copyright (c) 2020 Michael Lynch. All rights reserved.
13 changes: 0 additions & 13 deletions Gemfile

This file was deleted.

145 changes: 0 additions & 145 deletions Gemfile.lock

This file was deleted.

0 comments on commit d6dcc84

Please sign in to comment.