Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
richcarl committed Sep 1, 2021
0 parents commit 826b98a
Show file tree
Hide file tree
Showing 22 changed files with 8,527 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// 11ty configuration
module.exports = function(config) {
// avoid ignoring generated files such as css
config.setUseGitIgnore(false);

config.addPassthroughCopy('./src/css/');
config.addPassthroughCopy('./src/js/');
config.addPassthroughCopy('./src/images/');

// Add the navigation plugin
config.addPlugin( require('@11ty/eleventy-navigation') );

// We want the attrs and bracketed-spans extensions
let markdownIt = require("markdown-it");
config.setLibrary("md",
markdownIt({ html: true })
.use(require("markdown-it-attrs"))
.use(require('markdown-it-div'))
.use(require("markdown-it-bracketed-spans")));

return {
markdownTemplateEngine: "njk",
htmlTemplateEngine: "njk",
dir: {
input: 'src'
//output: 'docs' // default: _site
}
};
};
42 changes: 42 additions & 0 deletions .github/workflows/eleventy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Eleventy Build

on:
push:
branches: [ master ]

pull_request:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# The following are for the Eleventy build

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci

- run: npm run build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
_site
Empty file added .nojekyll
Empty file.
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
all: build

build:
npm run build

update:
npm update

# serve up the site at http://localhost:8080/
serve:
npm run watch

# set up npm environment from package.json
init:
npm install
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Template for an 11ty-generated site
Loading

0 comments on commit 826b98a

Please sign in to comment.