-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace Jekyll with Eleventy (#3652)
* Add eleventy as a static site generator * Code syntax highlighting, header anchors and fix fragment id links * Disable line breaks in paragraphs * Make date in footer work * Remove jekyll completely and describe how to use eleventy * Include missing favicon * Unify heading fragment identifier slug generation * Eliminate default layout partials * Autoformat style.css * Remove left over jekyll config * Rework build pipeline to speed things up * Fixed broken fragment identifier link in docs * Add .js extension dotfiles to linting setup. Addresses #3652 (comment) * Performance improvements. Prefetch google analytics and lazyload images * Performance improvements. Preload opencollective fallback avatar * Update docs/api/index.html Co-Authored-By: Munter <[email protected]> * Correct docs readme * Fix wrong syntax in Strict-Transport-Security header and added Referrrer-Policy header * Add image type to ppreload of opencollective fallback avatar * Stop preloading tracking scripts. They mess with the loading order and slow page rendering down
- Loading branch information
Showing
29 changed files
with
7,744 additions
and
4,494 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,44 @@ | ||
'use strict'; | ||
|
||
module.exports = function(eleventyConfig) { | ||
eleventyConfig.addPassthroughCopy('docs/css'); | ||
eleventyConfig.addPassthroughCopy('docs/js'); | ||
eleventyConfig.addPassthroughCopy('docs/images'); | ||
eleventyConfig.addPassthroughCopy('docs/CNAME'); | ||
eleventyConfig.addPassthroughCopy('docs/_headers'); | ||
eleventyConfig.addPassthroughCopy('docs/favicon.ico'); | ||
|
||
eleventyConfig.addPassthroughCopy('docs/example'); | ||
|
||
/* Markdown Plugins */ | ||
const markdown = require('markdown-it')({ | ||
html: true, | ||
linkify: true | ||
}); | ||
|
||
markdown.use(require('markdown-it-anchor'), { | ||
slugify: require('uslug'), | ||
permalink: true, | ||
permalinkBefore: true, | ||
permalinkClass: 'direct-link', | ||
permalinkSymbol: '#' | ||
}); | ||
|
||
markdown.use(require('markdown-it-attrs'), { | ||
leftDelimiter: '{:', | ||
rightDelimiter: '}' | ||
}); | ||
|
||
markdown.use(require('markdown-it-prism')); | ||
|
||
eleventyConfig.setLibrary('md', markdown); | ||
|
||
return { | ||
passthroughFileCopy: true, | ||
dir: { | ||
input: 'docs', | ||
includes: '_includes', | ||
output: 'docs/_site' | ||
} | ||
}; | ||
}; |
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ mocha.js | |
docs/ | ||
out/ | ||
!lib/mocha.js | ||
!.*.js |
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 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.
This file was deleted.
Oops, something went wrong.
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,6 @@ | ||
README.md | ||
API.md | ||
LICENSE* | ||
.* | ||
_dist/ | ||
example/ |
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.
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 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,53 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width,initial-scale=1" /> | ||
<title>{{ page.title }}</title> | ||
<link | ||
rel="preload" | ||
href="https://opencollective.com/static/images/user.svg" | ||
as="image" | ||
crossorigin="anonymous" | ||
/> | ||
<link rel="stylesheet" href="css/normalize.css" /> | ||
<link rel="stylesheet" href="css/style.css" /> | ||
<link rel="stylesheet" href="css/prism.css" /> | ||
<link rel="shortcut icon" href="favicon.ico" /> | ||
|
||
<!--[if lt IE 9]> <script src="js/html5shiv.min.js"></script> <![endif]--> | ||
</head> | ||
|
||
<body> | ||
<header id="_header"> | ||
<h1> | ||
<a href="/"> | ||
<img | ||
src="/images/mocha-logo.svg" | ||
alt="Mocha" | ||
width="192" | ||
height="192" | ||
/> | ||
</a> | ||
</h1> | ||
|
||
<p id="tag"><em>simple</em>, <em>flexible</em>, <em>fun</em></p> | ||
</header> | ||
|
||
<main id="content">{{ content }}</main> | ||
|
||
<footer> | ||
<span> | ||
<a href="https://mochajs.org">mochajs.org</a> is licensed under a | ||
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/" | ||
>Creative Commons Attribution 4.0 International License</a | ||
>. | ||
<p> | ||
<em>Last updated: {{ 'now' | date: '%a %b %d %H:%M:%S %Y' }}</em> | ||
</p></span | ||
> | ||
</footer> | ||
|
||
<script src="js/ga.js" async></script> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | ||
<title>Document</title> | ||
</head> | ||
<body> | ||
<h1> | ||
The JSDoc API documentation will be placed here by the build system | ||
</h1> | ||
</body> | ||
</html> |
Oops, something went wrong.