Added MDLINT_PATH to 'make lint', rewrote README

This commit is contained in:
Bastian de Byl
2020-11-05 22:37:23 -05:00
parent bcb8ccfb28
commit b4e403fa67
2 changed files with 18 additions and 42 deletions

View File

@@ -21,6 +21,7 @@ AWS_IMAGE=$(AWS_IMAGE_NAME):$(AWS_IMAGE_TAG)
MDLINT_IMAGE_NAME=peterdavehello/markdownlint MDLINT_IMAGE_NAME=peterdavehello/markdownlint
MDLINT_IMAGE_TAG?=latest MDLINT_IMAGE_TAG?=latest
MDLINT_IMAGE?=$(MDLINT_IMAGE_NAME):$(MDLINT_IMAGE_TAG) MDLINT_IMAGE?=$(MDLINT_IMAGE_NAME):$(MDLINT_IMAGE_TAG)
MDLINT_PATH?=content/
# Container Variables # Container Variables
RUN_USER=--user $(shell id -u $$USER):$(shell id -g $$USER) RUN_USER=--user $(shell id -u $$USER):$(shell id -g $$USER)
@@ -46,7 +47,7 @@ build:
.PHONY: build .PHONY: build
lint: lint:
$(DOCKER_RUN) -v $$PWD:/md:ro ${MDLINT_IMAGE} markdownlint content/ $(DOCKER_RUN) -v $$PWD:/md:ro ${MDLINT_IMAGE} markdownlint ${MDLINT_PATH}
.PHONY: lint .PHONY: lint
static-pull: static-pull:

View File

@@ -1,52 +1,27 @@
# Description # Description
[![Build
Status](https://ci.bdebyl.net/api/badges/bdebyl/bdebyl-site/status.svg)](https://ci.bdebyl.net/bdebyl/bdebyl-site)
This repository houses the posts for my site [bdebyl.net](https://bdebyl.net). This repository houses the posts for my site [bdebyl.net](https://bdebyl.net).
It utilizes the [Hugo](gohugo.io) static-site generator to convert Markdown
files to a static, HTML site. This is then served via AWS S3 behind AWS
Cloudfront (cache).
I make occasional updates to add blog posts, tutorials, projects write-ups, I make occasional updates to add blog posts, tutorials, projects write-ups,
etc. The binary static content is all hosted on S3 (i.e. `.jpeg`, `.png`, etc.). etc. The binary static content is all hosted on S3 (i.e. `.jpeg`, `.png`, etc.).
It was setup using **Terraform**, or more ## Theme
specifically
[alimac/terraform-s3 (from commit 4b32c8d)](https://github.com/alimac/terraform-s3/tree/4b32c8d336ffacc4318c065f8d135973210f535c) --
big thank you to [**@alimac**](https://github.com/alimac/) on GitHub for that!
# Usage The theme that this site utilizes is my minimal fork of the
[Hugo Even Theme](https://github.com/bdebyl/hugo-theme-even). The fork strips
The Makefile is a simple wrapper for the `bdebyl/hugo` Docker image and `aws out **all** JavaScript which, personally, I've found completely unnecessary for
s3`, but provides useful short commands to test the hugo site locally and deploy the purposes of my personal site. Additionally, some custom shortcodes and CSS
it to AWS. changes were added (along with a Makefile for utilizing SCSS).
## Dependencies
[Docker](https://docs.docker.com/install/) is required to run the make targets
for hosting and generating the static Hugo site.
## Development
To build the static content _without_ running the Hugo server:
```bash
make build
```
To start the Hugo server on `http://localhost:1313`:
```bash
make run
```
## Deployment ## Deployment
To deploy to AWS: Deployments are done using my personal [Drone CI
Server](https://ci.bdebyl.net). Each commit has an attached build run to it,
```bash and can be viewed publicly, though the rest is locked down to allow only me
make deploy (_sorry_).
```
## Cache Busting
Bust the Cloudfront cache:
```bash
make cache
```