Skip to content

Commit

Permalink
Add website with Eleventy based off Opensac.org theme. (#25)
Browse files Browse the repository at this point in the history
* Create deploy-gh-pages.yml

* Initialize Eleventy site with Open Sac theme.

* Add pages for Opensac.org and Learning Blocks.

* Add github pages pathprefix during deployment.
  • Loading branch information
natebass authored Dec 11, 2023
1 parent 4a6331f commit d8424f1
Show file tree
Hide file tree
Showing 58 changed files with 13,514 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const yaml = require('js-yaml')

/**
* Configuration for Eleventy.
* See: /public/documentation/eleventy-configuration.md
* Supports:
* - Yaml data files
*
* @parameter config Eleventy configuration object.
* @return The return object is separate from the Eleventy configuration object.
*/
const eleventyConfig = config => {
config.ignores.add('README.md')
config.addPassthroughCopy('public')
config.addDataExtension('yml', contents => yaml.load(contents))
config.addWatchTarget('./styles/')
return {
dir: {
input: 'content',
includes: '../_includes'
},
compileOptions: {
cache: false
}
}
}

module.exports = eleventyConfig
32 changes: 32 additions & 0 deletions .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy Next.js static site to GitHub pages

on:
push:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 21.x ]
steps:
- uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Build Next.js static site
run: |
npm install
npm run build-ghpages
- name: Ignore Jekyll
run: |
touch _site/.nojekyll
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: _site
git-config-name: Automated
git-config-email: [email protected]
branch: gh-pages
Loading

0 comments on commit d8424f1

Please sign in to comment.