New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Jekyll with Eleventy #3652
Changes from 15 commits
69cc9a8
6b5c6fb
88beb32
6f82c84
2fef2bf
1d2d0d7
c3d173c
e89e5e7
e918a60
de6cf65
4e184bc
7fbb3b0
caacea9
75c1ed1
a9ddc49
e46e528
d615050
4f3ce5a
a9ec6fe
c7840cd
166317e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is "doc/example" not named "doc/examples"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good question. My best guess is because there's only one There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, there are multiple examples... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lol |
||
|
||
/* 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' | ||
} | ||
}; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ mocha.js | |
docs/ | ||
out/ | ||
!lib/mocha.js | ||
!.*.js |
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
README.md | ||
API.md | ||
LICENSE* | ||
.* | ||
_dist/ | ||
example/ |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<!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" | ||
crossorigin="anonymous" | ||
/> | ||
<link | ||
rel="prefetch" | ||
href="https://www.google-analytics.com/analytics.js" | ||
crossorigin="anonymous" | ||
/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we tracking? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's useful to have some metrics, otherwise we have no idea how many hits we're getting or where people are from (where to focus future i18n efforts..) |
||
<link rel="preconnect" href="https://stats.g.doubleclick.net" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this here? Are Advertising Features enabled for GA? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "stats.g.doubleclick.net" Is one of DoubleClick subdomains used for loading tracking pixels or as an alternative for loading Google Analytics, collecting statistics and data that google uses to analyze and display advertisments. https://tonnygaric.com/blog/prevent-google-analytics-from-making-requests-to-stats-g-doubleclick-net There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no idea, but that can be removed. we could also drop GA for something like Matomo. It's €9/mo which we could pay for out of the fund. I use it on my personal site and it's bomb. |
||
<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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. odd formatting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we have vscode to thank for that one. I'm not entirely converted to vscode yet, so I still get surprised by these weird things and wonder how I can configure it not to do this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. formatting is a head-scratcher. various plugins insert themselves as formatters for various languages and/or contexts. I find it helpful to explicitly disable plugins I'm not going to use in the project I'm working on. For example, the cpplint extension decided it wanted to format my JS and wouldn't let the prettier extension do it... That said, once you get it working, it works well. |
||
>. | ||
<p> | ||
<em>Last updated: {{ 'now' | date: '%a %b %d %H:%M:%S %Y' }}</em> | ||
</p></span | ||
> | ||
</footer> | ||
|
||
<script src="js/ga.js" async></script> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tracking still? Who can see the reports? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It discussed in #3349 |
||
</body> | ||
</html> |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
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 dopcumentation will be placed here by the build system | ||
Munter marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</h1> | ||
</body> | ||
</html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just chain these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've come to prefer verbosity and ability to easily delete or comment out sections over DRY
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe an array of filepaths, one per line, then iterate over it? dunno, whatever, not important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then how about invert them?