-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alec Marcus
committed
Feb 5, 2021
1 parent
afeafa2
commit 68587a0
Showing
137 changed files
with
15,593 additions
and
11,030 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,109 @@ | ||
const fs = require('fs'); | ||
const pluginSyntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight'); | ||
const pluginNavigation = require('@11ty/eleventy-navigation'); | ||
const markdownIt = require('markdown-it'); | ||
const markdownItAnchor = require('markdown-it-anchor'); | ||
const { | ||
// getSlugMap, | ||
getSortedCollection, | ||
// getTagList | ||
} = require('./src/_11ty/collections'); | ||
const { | ||
htmlDateString, | ||
// includesSolution, | ||
// includesTeam, | ||
// includesTechnology, | ||
readableDate, | ||
// sortCollectionByTitle, | ||
} = require('./src/_11ty/filters'); | ||
|
||
require('dotenv').config({ path: `.env.${process.env.NODE_ENV || 'development'}` }); | ||
|
||
// https://www.11ty.dev/docs/config/ | ||
module.exports = function (eleventyConfig) { | ||
eleventyConfig.addPlugin(pluginSyntaxHighlight); | ||
eleventyConfig.addPlugin(pluginNavigation); | ||
|
||
/* Markdown Overrides */ | ||
let markdownLibrary = markdownIt({ | ||
html: true, | ||
breaks: true, | ||
linkify: true, | ||
}).use(markdownItAnchor, { | ||
permalink: true, | ||
permalinkClass: 'direct-link', | ||
permalinkSymbol: '#', | ||
}); | ||
eleventyConfig.setLibrary('md', markdownLibrary); | ||
|
||
eleventyConfig.setDataDeepMerge(true); | ||
eleventyConfig.setUseGitIgnore(false); | ||
|
||
// For rendering JSON API routes | ||
eleventyConfig.addJavaScriptFunction('renderApi', data => JSON.stringify(data, null, '\t')); | ||
|
||
/** | ||
* Add custom collections | ||
* | ||
* @see https://www.11ty.dev/docs/collections/#advanced-custom-filtering-and-sorting | ||
*/ | ||
eleventyConfig.addCollection('sortedEntries', collectionApi => | ||
getSortedCollection(collectionApi, 'entries'), | ||
); | ||
|
||
/** | ||
* Add custom filters | ||
* | ||
* @see https://www.11ty.dev/docs/filters/ | ||
*/ | ||
eleventyConfig.addFilter('htmlDateString', htmlDateString); | ||
eleventyConfig.addFilter('readableDate', readableDate); | ||
// eleventyConfig.addFilter('includesSolution', includesSolution); | ||
// eleventyConfig.addFilter('includesTeam', includesTeam); | ||
// eleventyConfig.addFilter('includesTechnology', includesTechnology); | ||
// eleventyConfig.addFilter('sortCollectionByTitle', sortCollectionByTitle); | ||
|
||
/** | ||
* Add custom watch targets | ||
* | ||
* @see https://www.11ty.dev/docs/config/#add-your-own-watch-targets | ||
*/ | ||
eleventyConfig.addWatchTarget('./bundle/'); | ||
eleventyConfig.addWatchTarget('./src/assets/styles/'); | ||
eleventyConfig.addWatchTarget('./src/pages/'); | ||
|
||
/** | ||
* Copy directories to _site | ||
* | ||
* @see https://www.11ty.dev/docs/copy/#passthrough-file-copy | ||
*/ | ||
eleventyConfig.addPassthroughCopy('src/static/img'); | ||
eleventyConfig.addPassthroughCopy('src/static/fonts'); | ||
eleventyConfig.addPassthroughCopy({ bundle: 'assets/scripts' }); | ||
|
||
// Browsersync Overrides | ||
eleventyConfig.setBrowserSyncConfig({ | ||
callbacks: { | ||
ready: function (err, browserSync) { | ||
const content_404 = fs.readFileSync('_site/404.html'); | ||
|
||
browserSync.addMiddleware('*', (req, res) => { | ||
// Provides the 404 content without redirect. | ||
res.write(content_404); | ||
res.end(); | ||
}); | ||
}, | ||
}, | ||
ui: false, | ||
ghostMode: false, | ||
}); | ||
|
||
return { | ||
templateFormats: ['md', 'njk', 'html', 'liquid', '11ty.js'], | ||
|
||
// These are all optional, defaults are shown: | ||
dir: { | ||
input: 'src', | ||
}, | ||
}; | ||
}; |
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,2 @@ | ||
README.md | ||
src/_11ty/ |
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,2 @@ | ||
# The URL of the host site | ||
SITE_URL="http://localhost:8080" |
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,10 @@ | ||
{ | ||
"extends": "@upstatement/eslint-config/vue" | ||
"extends": "@upstatement", | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"env": { | ||
"browser": true, | ||
"node": 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,25 @@ | ||
--- | ||
name: Bug Report | ||
about: If something is broken or not working as expected, report it here. | ||
--- | ||
|
||
# Description | ||
|
||
Describe the issue that you're seeing. | ||
|
||
## Steps to reproduce | ||
|
||
Clear steps describing how to reproduce the issue. | ||
|
||
## Expected result | ||
|
||
What should happen? | ||
|
||
## Actual result | ||
|
||
What happened. | ||
|
||
## Environment | ||
|
||
- OS: | ||
- Browser & version: |
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: Feature Request | ||
about: Suggest a new idea for the project. | ||
--- | ||
|
||
# Summary | ||
|
||
Brief explanation of the feature. | ||
|
||
## Basic example | ||
|
||
If the proposal involves a new or changed API, include a basic code example. Omit this section if it's not applicable. | ||
|
||
## Motivation | ||
|
||
Why are we doing this? What use cases does it support? What is the expected outcome? |
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 @@ | ||
--- | ||
name: Question | ||
about: Usage question or discussion | ||
--- | ||
|
||
# Summary | ||
|
||
## Relevant information | ||
|
||
<!-- Provide as much useful information as you can --> | ||
|
||
### Environment (if relevant) |
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,9 @@ | ||
## Changes | ||
|
||
<!-- Detail your changes here --> | ||
|
||
<!-- Add an image of expected results, if relevant --> | ||
|
||
## Steps To Test | ||
|
||
<!-- npm install? --> |
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,71 +1,11 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
/sitespeed-result | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
_site/ | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Typescript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
.DS_Store | ||
.cache | ||
bundle | ||
|
||
# dotenv environment variable files | ||
# Environment variables | ||
.env | ||
.env.local | ||
.env.development | ||
.env.production | ||
|
||
# gatsby files | ||
.cache/ | ||
|
||
# Mac files | ||
.DS_Store | ||
|
||
# Yarn | ||
yarn-error.log | ||
.pnp/ | ||
.pnp.js | ||
# Yarn Integrity file | ||
.yarn-integrity |
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 +1 @@ | ||
12.13.1 | ||
v12.16.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
entry: | ||
temples: | ||
- template: ./templates/entry.template | ||
output: ./src/entries/{{ kebab name }}.md | ||
prompt: | ||
- key: name | ||
doc: Entry name | ||
|
||
collection: | ||
temples: | ||
- template: ./templates/collection.template | ||
output: ./src/collections/{{ kebab name }}.md | ||
prompt: | ||
- key: name | ||
doc: Collection name | ||
|
||
series: | ||
temples: | ||
- template: ./templates/series.template | ||
output: ./src/series/{{ kebab name }}.md | ||
prompt: | ||
- key: name | ||
doc: Series name |
Oops, something went wrong.