-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Replace Jekyll with Eleventy #3652
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
Changes from all 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,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 | ||
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 documentation will be placed here by the build system | ||
</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?