-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from BlueSlug/feat/design-update-GH-46 (resolves
- Loading branch information
Showing
229 changed files
with
37,745 additions
and
24,743 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
insert_final_newline = true | ||
|
||
[*.js] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.yml] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,101 @@ | ||
/* | ||
Copyright the Inclusive Learning Design Handbook copyright holders. | ||
See the AUTHORS.md file at the top-level directory of this distribution and at | ||
https://github.com/fluid-project/handbook.floeproject.org/raw/main/AUTHORS.md. | ||
Licensed under the New BSD license. You may not use this file except in compliance with this License. | ||
You may obtain a copy of the New BSD License at | ||
https://github.com/fluid-project/handbook.floeproject.org/raw/main/LICENSE.md. | ||
*/ | ||
|
||
"use strict"; | ||
|
||
const fs = require("fs"); | ||
const fluidPlugin = require("@fluid-project/eleventy-plugin-fluid"); | ||
|
||
const fluidPlugin = require("eleventy-plugin-fluid"); | ||
const { EleventyRenderPlugin } = require("@11ty/eleventy"); | ||
const MarkdownIt = require("markdown-it"); | ||
const navigationPlugin = require("@11ty/eleventy-navigation"); | ||
const syntaxHighlightPlugin = require("@11ty/eleventy-plugin-syntaxhighlight"); | ||
|
||
// Import transforms | ||
const htmlMinTransform = require("./src/transforms/html-min-transform.js"); | ||
const parseTransform = require("./src/transforms/parse-transform.js"); | ||
|
||
// Import data files | ||
const siteConfig = require("./src/_data/config.json"); | ||
const getResourceLinks = require("./src/utils/getResourceLinks.js"); | ||
|
||
module.exports = function (config) { | ||
config.setUseGitIgnore(false); | ||
|
||
// Layouts | ||
config.addLayoutAlias("default", "layouts/default.njk"); | ||
|
||
// Plugins | ||
config.addPlugin(fluidPlugin); | ||
config.addPlugin(navigationPlugin); | ||
config.addPlugin(syntaxHighlightPlugin); | ||
// Filters | ||
const md = new MarkdownIt({ | ||
html: true, | ||
quotes: "“”‘’" | ||
}); | ||
config.addFilter("markdown", (content) => { | ||
return md.render(content); | ||
}); | ||
|
||
// Transforms | ||
config.addTransform("htmlmin", htmlMinTransform); | ||
config.addTransform("parse", parseTransform); | ||
|
||
// Passthrough copy | ||
config.addPassthroughCopy("src/_redirects"); | ||
config.addPassthroughCopy({"src/assets/images": "assets/images"}); | ||
config.addPassthroughCopy({"src/assets/fonts": "assets/fonts"}); | ||
config.addPassthroughCopy({"node_modules/docs-core/src/static/css": "assets/styles"}); | ||
config.addPassthroughCopy({"node_modules/docs-core/src/static/lib": "lib"}); | ||
config.addPassthroughCopy({"src/assets/icons": "/"}); | ||
config.addPassthroughCopy({"src/assets/images": "assets/images"}); | ||
|
||
// Plugins | ||
config.addPlugin(EleventyRenderPlugin); | ||
config.addPlugin(fluidPlugin); | ||
config.addPlugin(navigationPlugin); | ||
config.addPlugin(syntaxHighlightPlugin); | ||
|
||
// BrowserSync | ||
// Shortcodes | ||
config.addShortcode("svg_sprite", (sprite, altText, ariaHidden = true) => { | ||
const altTextMarkup = altText ? `<title>${altText}</title>` : ""; | ||
const ariaHiddenMarkup = ariaHidden ? " aria-hidden=\"true\"" : ""; | ||
return `<svg class="ildh-${sprite}"${ariaHiddenMarkup}>${altTextMarkup}<use xlink:href="/assets/images/sprites.svg#${sprite}"></use></svg>`; | ||
}); | ||
|
||
config.addShortcode("extract_resource_links", (content, sideContentHeadings, lang) => { | ||
return getResourceLinks(content, sideContentHeadings, lang); | ||
}); | ||
|
||
// 404 | ||
config.setBrowserSyncConfig({ | ||
callbacks: { | ||
ready: (error, browserSync) => { | ||
const content404 = fs.readFileSync("dist/404.html"); | ||
ready: function (err, bs) { | ||
|
||
browserSync.addMiddleware("*", (request, response) => { | ||
bs.addMiddleware("*", (req, res) => { | ||
const content_404 = fs.readFileSync("dist/404.html"); | ||
// Provides the 404 content without redirect. | ||
response.write(content404); | ||
response.writeHead(404); | ||
response.end(); | ||
res.write(content_404); | ||
res.writeHead(404); | ||
res.end(); | ||
}); | ||
} | ||
} | ||
}); | ||
|
||
config.on("beforeBuild", () => { | ||
if (!siteConfig.languages[siteConfig.defaultLanguage]) { | ||
process.exitCode = 1; | ||
throw new Error(`The default language, ${siteConfig.defaultLanguage}, configured in src/_data/config.json is not one of your site's supported languages.`); | ||
} | ||
}); | ||
|
||
return { | ||
dir: { | ||
input: "src", | ||
output: "dist" | ||
input: "src", | ||
output: "dist", | ||
includes: "_includes" | ||
}, | ||
passthroughFileCopy: true | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"lintspaces": { | ||
"newlines": { | ||
"excludes": ["./src/assets/fonts/*.ttf"] | ||
}, | ||
"jsonindentation": { | ||
"excludes": ["./src/_data/*.json"] | ||
} | ||
}, | ||
"markdownlint": { | ||
"includes": ["./.github/**/*.md", "./CHANGELOG.md"], | ||
"excludes": [ | ||
"./.github/pull_request_template.md", | ||
"./src/collections/pages/en-CA/footer-context.md", | ||
"./src/collections/pages/en-CA/footer-credits.md", | ||
"./src/collections/pages/en-CA/footer-tagline.md", | ||
"./src/collections/pages/en-CA/toolkits-and-guides.md" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: Bug | ||
assignees: '' | ||
--- | ||
|
||
## Describe the bug | ||
|
||
A clear and concise description of what the bug is. | ||
|
||
### To reproduce | ||
|
||
Steps to reproduce the behavior: | ||
|
||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
### Expected behavior | ||
|
||
A clear and concise description of what you expected to happen. | ||
|
||
## Screenshots | ||
|
||
If applicable, add screenshots to help explain your problem. | ||
|
||
## Technical details | ||
|
||
### Desktop | ||
|
||
- OS: [e.g. iOS] | ||
- Browser & version: [e.g. Chrome 95, Safari 14] | ||
|
||
### Mobile device | ||
|
||
- Device: [e.g. iPhone6] | ||
- OS: [e.g. iOS8.1] | ||
- Browser & version: [e.g. stock browser, Safari 15] | ||
|
||
### Assistive technology used | ||
|
||
- Name: [Name of assistive technology] | ||
- Version: [e.g. 22] | ||
|
||
## Additional context or notes | ||
|
||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: Enhancement | ||
assignees: '' | ||
--- | ||
|
||
## Is your feature request related to a problem? | ||
|
||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
## Describe the solution you'd like | ||
|
||
A clear and concise description of what you want to happen. | ||
|
||
## Describe alternative solutions you've considered | ||
|
||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
## Additional context or notes | ||
|
||
Add any other context or screenshots about the feature request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
# Enable version updates for npm | ||
- package-ecosystem: "npm" | ||
# Look for `package.json` and `lock` files in the `root` directory | ||
directory: "/" | ||
# Check for updates once a month | ||
schedule: | ||
interval: "monthly" | ||
allow: | ||
# Allow direct updates only (for packages named in package.json) | ||
- dependency-type: "direct" | ||
ignore: | ||
- dependency-name: "husky" | ||
versions: [">=5"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
* [ ] This pull request has been linted by running `npm run lint` without errors | ||
* [ ] This pull request has been tested by running `npm run start` and reviewing affected routes | ||
* [ ] This pull request has been built by running `npm run build` without errors | ||
* [ ] This isn't a duplicate of an existing pull request | ||
|
||
## Description | ||
|
||
<!-- A description of the pull request --> | ||
|
||
## Steps to test | ||
|
||
1. <!-- First step --> | ||
2. <!-- Second step --> | ||
3. <!-- and so on... --> | ||
|
||
**Expected behavior:** <!-- What should happen --> | ||
|
||
## Additional information | ||
|
||
<!-- Please provide any additional information that can help us review your contribution. --> | ||
|
||
## Related issues | ||
|
||
<!-- If this pull request resolves an issue, please indicate the issue number here, e.g. 'Resolves #42' --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} | ||
- name: Install dependencies | ||
run: | | ||
npm i | ||
env: | ||
CI: true | ||
- name: Lint JavaScript and JSON files | ||
run: | | ||
npm run lint | ||
env: | ||
CI: true | ||
- name: Build with Docker | ||
run: docker build . | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Publish release | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
id: release | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
release-type: node | ||
package-name: handbook.floeproject.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
dist | ||
node_modules | ||
dist | ||
src/_data/assets.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "stylelint-config-fluid" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Authors | ||
|
||
## Copyright Holders | ||
|
||
Copyright 2015-2022 | ||
|
||
This is the list of Inclusive Learning Design Handbook copyright holders. It does not list all individual contributors | ||
because some have assigned copyright to an institution, only made minor changes, or their contributions no longer appear | ||
in the codebase. Please see the version control system's revision history for details on contributions. | ||
|
||
* OCAD University | ||
|
||
## Contributors | ||
|
||
Individual contributions can be viewed on the | ||
[Contributors](https://github.com/fluid-project/handbook.floeproject.org/graphs/contributors) page, | ||
or through the version control system's revision history. | ||
|
||
**Note**: Individual authors may not hold copyright. See above "Copyright Holders" section for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.