mirror of
https://github.com/penpot/penpot-docs.git
synced 2024-07-06 05:41:47 +00:00
🎉 Setup initial tooling
This commit is contained in:
parent
5b1d4cab84
commit
aee4341b5d
9
.editorconfig
Normal file
9
.editorconfig
Normal file
|
@ -0,0 +1,9 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
charset = utf-8
|
111
.eleventy.js
Normal file
111
.eleventy.js
Normal file
|
@ -0,0 +1,111 @@
|
|||
const { DateTime } = require("luxon");
|
||||
const fs = require("fs");
|
||||
const pluginRss = require("@11ty/eleventy-plugin-rss");
|
||||
const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
|
||||
const pluginNavigation = require("@11ty/eleventy-navigation");
|
||||
const pluginTOC = require('eleventy-plugin-nesting-toc');
|
||||
const markdownIt = require("markdown-it");
|
||||
const markdownItAnchor = require("markdown-it-anchor");
|
||||
const markdownItPlantUML = require("assassin-custom-plantuml");
|
||||
const metagen = require('eleventy-plugin-metagen');
|
||||
|
||||
|
||||
module.exports = function(eleventyConfig) {
|
||||
eleventyConfig.addPlugin(pluginRss);
|
||||
eleventyConfig.addPlugin(pluginSyntaxHighlight);
|
||||
eleventyConfig.addPlugin(pluginNavigation);
|
||||
eleventyConfig.addPlugin(metagen);
|
||||
eleventyConfig.addPlugin(pluginTOC, {
|
||||
tags: ['h1', 'h2', 'h3']
|
||||
});
|
||||
|
||||
eleventyConfig.setDataDeepMerge(true);
|
||||
|
||||
eleventyConfig.addLayoutAlias("post", "layouts/post.njk");
|
||||
|
||||
eleventyConfig.addFilter("readableDate", dateObj => {
|
||||
return DateTime.fromJSDate(dateObj, {zone: 'utc'}).toFormat("dd LLL yyyy");
|
||||
});
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string
|
||||
eleventyConfig.addFilter('htmlDateString', (dateObj) => {
|
||||
return DateTime.fromJSDate(dateObj, {zone: 'utc'}).toFormat('yyyy-LL-dd');
|
||||
});
|
||||
|
||||
// Get the first `n` elements of a collection.
|
||||
eleventyConfig.addFilter("head", (array, n) => {
|
||||
if( n < 0 ) {
|
||||
return array.slice(n);
|
||||
}
|
||||
|
||||
return array.slice(0, n);
|
||||
});
|
||||
|
||||
eleventyConfig.addFilter("min", (...numbers) => {
|
||||
return Math.min.apply(null, numbers);
|
||||
});
|
||||
|
||||
eleventyConfig.addPassthroughCopy("img");
|
||||
eleventyConfig.addPassthroughCopy("css");
|
||||
|
||||
/* Markdown Overrides */
|
||||
let markdownLibrary = markdownIt({
|
||||
html: true,
|
||||
breaks: true,
|
||||
linkify: true
|
||||
}).use(markdownItAnchor, {
|
||||
permalink: true,
|
||||
permalinkClass: "direct-link",
|
||||
permalinkSymbol: "#"
|
||||
}).use(markdownItPlantUML, {
|
||||
});
|
||||
eleventyConfig.setLibrary("md", markdownLibrary);
|
||||
|
||||
// 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"
|
||||
],
|
||||
|
||||
// If your site lives in a different subdirectory, change this.
|
||||
// Leading or trailing slashes are all normalized away, so don’t worry about those.
|
||||
|
||||
// If you don’t have a subdirectory, use "" or "/" (they do the same thing)
|
||||
// This is only used for link URLs (it does not affect your file structure)
|
||||
// Best paired with the `url` filter: https://www.11ty.dev/docs/filters/url/
|
||||
|
||||
// You can also pass this in on the command line using `--pathprefix`
|
||||
// pathPrefix: "/",
|
||||
|
||||
markdownTemplateEngine: "liquid",
|
||||
htmlTemplateEngine: "njk",
|
||||
dataTemplateEngine: "njk",
|
||||
|
||||
// These are all optional, defaults are shown:
|
||||
dir: {
|
||||
input: ".",
|
||||
includes: "_includes",
|
||||
data: "_data",
|
||||
output: "_site"
|
||||
}
|
||||
};
|
||||
};
|
1
.eleventyignore
Normal file
1
.eleventyignore
Normal file
|
@ -0,0 +1 @@
|
|||
README.md
|
17
404.md
Normal file
17
404.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
layout: layouts/home.njk
|
||||
permalink: 404.html
|
||||
eleventyExcludeFromCollections: true
|
||||
---
|
||||
# Content not found.
|
||||
|
||||
Go <a href="{{ '/' | url }}">home</a>.
|
||||
|
||||
{% comment %}
|
||||
Read more: https://www.11ty.dev/docs/quicktips/not-found/
|
||||
|
||||
This will work for both GitHub pages and Netlify:
|
||||
|
||||
* https://help.github.com/articles/creating-a-custom-404-page-for-your-github-pages-site/
|
||||
* https://www.netlify.com/docs/redirects/#custom-404
|
||||
{% endcomment %}
|
21
_data/metadata.json
Executable file
21
_data/metadata.json
Executable file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"title": "Penpot documentation site",
|
||||
"url": "https://docs.penpot.app/",
|
||||
"description": "Design freedom for teams.",
|
||||
"feed": {
|
||||
"subtitle": "Penpot: design freedom for teams.",
|
||||
"filename": "feed.xml",
|
||||
"path": "/feed/feed.xml",
|
||||
"id": "https://docs.penpot.app/"
|
||||
},
|
||||
"jsonfeed": {
|
||||
"path": "/feed/feed.json",
|
||||
"url": "https://docs.penpot.app/feed/feed.json"
|
||||
},
|
||||
"author": {
|
||||
"name": "Penpot",
|
||||
"email": "hello@penpot.app",
|
||||
"url": "https://penpot.app"
|
||||
},
|
||||
"twitter": "@penpotapp"
|
||||
}
|
43
_includes/layouts/base.njk
Normal file
43
_includes/layouts/base.njk
Normal file
|
@ -0,0 +1,43 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ title or metadata.title }}</title>
|
||||
<meta name="description" content="{{ description or metadata.description }}">
|
||||
<link rel="stylesheet" href="{{ '/css/index.css' | url }}">
|
||||
<link rel="stylesheet" href="{{ '/css/prism-base16-monokai.dark.css' | url }}">
|
||||
<link rel="alternate" href="{{ metadata.feed.path | url }}" type="application/atom+xml" title="{{ metadata.title }}">
|
||||
<link rel="alternate" href="{{ metadata.jsonfeed.path | url }}" type="application/json" title="{{ metadata.title }}">
|
||||
{% metagen
|
||||
title=title or metadata.title,
|
||||
desc=desc or metadata.desc,
|
||||
url=url + page.url,
|
||||
img=image,
|
||||
img_alt=alt,
|
||||
twitterHandle=twitter or metadata.twitter,
|
||||
name=name
|
||||
%}
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1 class="home"><a href="{{ '/' | url }}">{{ metadata.title }}</a></h1>
|
||||
|
||||
<ul class="nav">
|
||||
{%- for entry in collections.all | eleventyNavigation %}
|
||||
<li class="nav-item{% if entry.url == page.url %} nav-item-active{% endif %}"><a href="{{ entry.url | url }}">{{ entry.title }}</a></li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
<main{% if templateClass %} class="{{ templateClass }}"{% endif %}>
|
||||
{{ content | safe }}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<a href="https://github.com/penpot/penpot-docs/blob/main/{{ page.inputPath }}">Edit this page on GitHub</a>
|
||||
</footer>
|
||||
|
||||
<!-- Current page: {{ page.url | url }} -->
|
||||
</body>
|
||||
</html>
|
15
_includes/layouts/developer-guide.njk
Normal file
15
_includes/layouts/developer-guide.njk
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
layout: layouts/base.njk
|
||||
templateClass: tmpl-home
|
||||
---
|
||||
|
||||
<div class="main-container">
|
||||
<aside class="sidebar">
|
||||
{{ content | toc | safe }}
|
||||
</aside>
|
||||
|
||||
<content class="main-content">
|
||||
{{ content | safe }}
|
||||
</content>
|
||||
</div>
|
||||
|
5
_includes/layouts/home.njk
Normal file
5
_includes/layouts/home.njk
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
layout: layouts/base.njk
|
||||
templateClass: tmpl-home
|
||||
---
|
||||
{{ content | safe }}
|
44
_site/404.html
Normal file
44
_site/404.html
Normal file
|
@ -0,0 +1,44 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Penpot documentation site</title>
|
||||
<meta name="description" content="Design freedom for teams.">
|
||||
<link rel="stylesheet" href="/css/index.css">
|
||||
<link rel="stylesheet" href="/css/prism-base16-monokai.dark.css">
|
||||
<link rel="alternate" href="/feed/feed.xml" type="application/atom+xml" title="Penpot documentation site">
|
||||
<link rel="alternate" href="/feed/feed.json" type="application/json" title="Penpot documentation site">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Penpot documentation site</title>
|
||||
<meta property="og:title" content="Penpot documentation site">
|
||||
<meta property="og:type" content="website">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:site" content="@penpotapp">
|
||||
<meta name="twitter:title" content="Penpot documentation site">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1 class="home"><a href="/">Penpot documentation site</a></h1>
|
||||
|
||||
<ul class="nav">
|
||||
<li class="nav-item"><a href="/">Home</a></li>
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
<main class="tmpl-home">
|
||||
<h1 id="content-not-found.">Content not found. <a class="direct-link" href="#content-not-found.">#</a></h1>
|
||||
<p>Go <a href="/">home</a>.</p>
|
||||
|
||||
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<a href="https://github.com/penpot/penpot-docs/blob/main/./404.md">Edit this page on GitHub</a>
|
||||
</footer>
|
||||
|
||||
<!-- Current page: /404.html -->
|
||||
</body>
|
||||
</html>
|
249
_site/css/index.css
Normal file
249
_site/css/index.css
Normal file
|
@ -0,0 +1,249 @@
|
|||
:root {
|
||||
--red: #C5004A;
|
||||
--darkred: #7F0036;
|
||||
--lightgray: #e0e0e0;
|
||||
--gray: #C0C0C0;
|
||||
--darkgray: #333;
|
||||
--navy: #17050F;
|
||||
--blue: #082840;
|
||||
--white: #fff;
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
html,
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: system-ui, sans-serif;
|
||||
color: var(--darkgray);
|
||||
background-color: var(--white);
|
||||
}
|
||||
p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
p,
|
||||
.tmpl-post li,
|
||||
img {
|
||||
max-width: 37.5em; /* 600px /16 */
|
||||
}
|
||||
p,
|
||||
.tmpl-post li {
|
||||
line-height: 1.45;
|
||||
}
|
||||
a[href] {
|
||||
color: var(--blue);
|
||||
}
|
||||
a[href]:visited {
|
||||
color: var(--navy);
|
||||
}
|
||||
main {
|
||||
padding: 1rem;
|
||||
}
|
||||
main :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
header {
|
||||
border-bottom: 1px dashed var(--lightgray);
|
||||
}
|
||||
header:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
table {
|
||||
margin: 1em 0;
|
||||
}
|
||||
table td,
|
||||
table th {
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
|
||||
line-height: 1.5;
|
||||
}
|
||||
pre {
|
||||
font-size: 14px;
|
||||
line-height: 1.375;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
-moz-tab-size: 2;
|
||||
-o-tab-size: 2;
|
||||
tab-size: 2;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
.highlight-line {
|
||||
display: block;
|
||||
padding: 0.125em 1em;
|
||||
text-decoration: none; /* override del, ins, mark defaults */
|
||||
color: inherit; /* override del, ins, mark defaults */
|
||||
}
|
||||
|
||||
/* allow highlighting empty lines */
|
||||
.highlight-line:empty:before {
|
||||
content: " ";
|
||||
}
|
||||
/* avoid double line breaks when using display: block; */
|
||||
.highlight-line + br {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.highlight-line-isdir {
|
||||
color: #b0b0b0;
|
||||
background-color: #222;
|
||||
}
|
||||
.highlight-line-active {
|
||||
background-color: #444;
|
||||
background-color: hsla(0, 0%, 27%, .8);
|
||||
}
|
||||
.highlight-line-add {
|
||||
background-color: #45844b;
|
||||
}
|
||||
.highlight-line-remove {
|
||||
background-color: #902f2f;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.home {
|
||||
padding: 0 1rem;
|
||||
float: left;
|
||||
margin: 1rem 0; /* 16px /16 */
|
||||
font-size: 1em; /* 16px /16 */
|
||||
}
|
||||
.home :link:not(:hover) {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Nav */
|
||||
.nav {
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
float: left;
|
||||
margin-left: 1em;
|
||||
}
|
||||
.nav-item {
|
||||
display: inline-block;
|
||||
margin-right: 1em;
|
||||
}
|
||||
.nav-item a[href]:not(:hover) {
|
||||
text-decoration: none;
|
||||
}
|
||||
.nav-item-active {
|
||||
font-weight: 700;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Posts list */
|
||||
.postlist {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
.postlist-item {
|
||||
counter-increment: start-from -1;
|
||||
}
|
||||
.postlist-item:before {
|
||||
display: inline-block;
|
||||
pointer-events: none;
|
||||
content: "" counter(start-from, decimal-leading-zero) ". ";
|
||||
line-height: 100%;
|
||||
text-align: right;
|
||||
}
|
||||
.postlist-date,
|
||||
.postlist-item:before {
|
||||
font-size: 0.8125em; /* 13px /16 */
|
||||
color: var(--darkgray);
|
||||
}
|
||||
.postlist-date {
|
||||
word-spacing: -0.5px;
|
||||
}
|
||||
.postlist-link {
|
||||
display: inline-block;
|
||||
padding: 0.25em 0.1875em; /* 4px 3px /16 */
|
||||
}
|
||||
.postlist-item-active .postlist-link {
|
||||
font-weight: bold;
|
||||
}
|
||||
.tmpl-home .postlist-link {
|
||||
font-size: 1.1875em; /* 19px /16 */
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding: 1rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
/* Tags */
|
||||
.post-tag {
|
||||
display: inline-block;
|
||||
vertical-align: text-top;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.625em; /* 10px /16 */
|
||||
padding: 2px 4px;
|
||||
margin-left: 0.8em; /* 8px /10 */
|
||||
background-color: var(--red);
|
||||
color: var(--white);
|
||||
border-radius: 0.25em; /* 3px /12 */
|
||||
text-decoration: none;
|
||||
}
|
||||
a[href].post-tag,
|
||||
a[href].post-tag:visited {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Warning */
|
||||
.warning {
|
||||
background-color: #ffc;
|
||||
padding: 1em 0.625em; /* 16px 10px /16 */
|
||||
}
|
||||
.warning ol:only-child {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Direct Links / Markdown Headers */
|
||||
.direct-link {
|
||||
font-family: sans-serif;
|
||||
text-decoration: none;
|
||||
font-style: normal;
|
||||
margin-left: .1em;
|
||||
}
|
||||
a[href].direct-link,
|
||||
a[href].direct-link:visited {
|
||||
color: transparent;
|
||||
}
|
||||
a[href].direct-link:focus,
|
||||
a[href].direct-link:focus:visited,
|
||||
:hover > a[href].direct-link,
|
||||
:hover > a[href].direct-link:visited {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
/* Particular classes */
|
||||
|
||||
.main-title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.media-container {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(100px, 25%) 1fr;
|
||||
}
|
91
_site/css/prism-base16-monokai.dark.css
Normal file
91
_site/css/prism-base16-monokai.dark.css
Normal file
|
@ -0,0 +1,91 @@
|
|||
/* Styles for syntax highlighting inside code blocks */
|
||||
|
||||
code[class*="language-"], pre[class*="language-"] {
|
||||
font-size: 14px;
|
||||
line-height: 1.375;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
-moz-tab-size: 2;
|
||||
-o-tab-size: 2;
|
||||
tab-size: 2;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
background: #272822;
|
||||
color: #f8f8f2;
|
||||
}
|
||||
pre[class*="language-"] {
|
||||
padding: 1.5em 0;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
.token.comment, .token.prolog, .token.doctype, .token.cdata {
|
||||
color: #75715e;
|
||||
}
|
||||
.token.punctuation {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
.token.operator, .token.boolean, .token.number {
|
||||
color: #fd971f;
|
||||
}
|
||||
.token.property {
|
||||
color: #f4bf75;
|
||||
}
|
||||
.token.tag {
|
||||
color: #66d9ef;
|
||||
}
|
||||
.token.string {
|
||||
color: #a1efe4;
|
||||
}
|
||||
.token.selector {
|
||||
color: #ae81ff;
|
||||
}
|
||||
.token.attr-name {
|
||||
color: #fd971f;
|
||||
}
|
||||
.token.entity, .token.url, .language-css .token.string, .style .token.string {
|
||||
color: #a1efe4;
|
||||
}
|
||||
.token.attr-value, .token.keyword, .token.control, .token.directive, .token.unit {
|
||||
color: #a6e22e;
|
||||
}
|
||||
.token.statement, .token.regex, .token.atrule {
|
||||
color: #a1efe4;
|
||||
}
|
||||
.token.placeholder, .token.variable {
|
||||
color: #66d9ef;
|
||||
}
|
||||
.token.deleted {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.token.inserted {
|
||||
border-bottom: 1px dotted #f9f8f5;
|
||||
text-decoration: none;
|
||||
}
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
.token.important, .token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.token.important {
|
||||
color: #f92672;
|
||||
}
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
pre > code.highlight {
|
||||
outline: 0.4em solid #f92672;
|
||||
outline-offset: .4em;
|
||||
}
|
2
_site/feed/.htaccess
Normal file
2
_site/feed/.htaccess
Normal file
|
@ -0,0 +1,2 @@
|
|||
# For Apache, to show `feed.xml` when browsing to directory /feed/ (hide the file!)
|
||||
DirectoryIndex feed.xml
|
13
_site/feed/feed.json
Normal file
13
_site/feed/feed.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"version": "https://jsonfeed.org/version/1",
|
||||
"title": "Penpot documentation site",
|
||||
"home_page_url": "https://docs.penpot.app/",
|
||||
"feed_url": "https://docs.penpot.app/feed/feed.json",
|
||||
"description": "Design freedom for teams.",
|
||||
"author": {
|
||||
"name": "Penpot",
|
||||
"url": "https://penpot.app"
|
||||
},
|
||||
"items": [
|
||||
]
|
||||
}
|
14
_site/feed/feed.xml
Normal file
14
_site/feed/feed.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>Penpot documentation site</title>
|
||||
<subtitle>Penpot: design freedom for teams.</subtitle>
|
||||
|
||||
<link href="https://docs.penpot.app/feed/feed.xml" rel="self"/>
|
||||
<link href="https://docs.penpot.app/"/>
|
||||
<updated>2021-02-11T13:10:17Z</updated>
|
||||
<id>https://docs.penpot.app/</id>
|
||||
<author>
|
||||
<name>Penpot</name>
|
||||
<email>hello@penpot.app</email>
|
||||
</author>
|
||||
</feed>
|
49
_site/index.html
Normal file
49
_site/index.html
Normal file
|
@ -0,0 +1,49 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Penpot documentation site</title>
|
||||
<meta name="description" content="Design freedom for teams.">
|
||||
<link rel="stylesheet" href="/css/index.css">
|
||||
<link rel="stylesheet" href="/css/prism-base16-monokai.dark.css">
|
||||
<link rel="alternate" href="/feed/feed.xml" type="application/atom+xml" title="Penpot documentation site">
|
||||
<link rel="alternate" href="/feed/feed.json" type="application/json" title="Penpot documentation site">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Penpot documentation site</title>
|
||||
<meta property="og:title" content="Penpot documentation site">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:image" content="img/placeholder.png">
|
||||
<meta name="twitter:card" content="summary">
|
||||
<meta name="twitter:site" content="@penpotapp">
|
||||
<meta name="twitter:title" content="Penpot documentation site">
|
||||
<meta name="twitter:image" content="img/placeholder.png">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1 class="home"><a href="/">Penpot documentation site</a></h1>
|
||||
|
||||
<ul class="nav">
|
||||
<li class="nav-item nav-item-active"><a href="/">Home</a></li>
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
<main class="tmpl-home">
|
||||
|
||||
<h1 class="main-title">Penpot documentation site</h1>
|
||||
|
||||
<p>Lorem ipsum dolor...</p>
|
||||
|
||||
|
||||
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
<a href="https://github.com/penpot/penpot-docs/blob/main/./index.njk">Edit this page on GitHub</a>
|
||||
</footer>
|
||||
|
||||
<!-- Current page: / -->
|
||||
</body>
|
||||
</html>
|
8
_site/sitemap.xml
Normal file
8
_site/sitemap.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
|
||||
<url>
|
||||
<loc>https://docs.penpot.app/</loc>
|
||||
<lastmod>2021-02-11</lastmod>
|
||||
</url>
|
||||
</urlset>
|
249
css/index.css
Normal file
249
css/index.css
Normal file
|
@ -0,0 +1,249 @@
|
|||
:root {
|
||||
--red: #C5004A;
|
||||
--darkred: #7F0036;
|
||||
--lightgray: #e0e0e0;
|
||||
--gray: #C0C0C0;
|
||||
--darkgray: #333;
|
||||
--navy: #17050F;
|
||||
--blue: #082840;
|
||||
--white: #fff;
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
html,
|
||||
body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-family: system-ui, sans-serif;
|
||||
color: var(--darkgray);
|
||||
background-color: var(--white);
|
||||
}
|
||||
p:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
p,
|
||||
.tmpl-post li,
|
||||
img {
|
||||
max-width: 37.5em; /* 600px /16 */
|
||||
}
|
||||
p,
|
||||
.tmpl-post li {
|
||||
line-height: 1.45;
|
||||
}
|
||||
a[href] {
|
||||
color: var(--blue);
|
||||
}
|
||||
a[href]:visited {
|
||||
color: var(--navy);
|
||||
}
|
||||
main {
|
||||
padding: 1rem;
|
||||
}
|
||||
main :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
header {
|
||||
border-bottom: 1px dashed var(--lightgray);
|
||||
}
|
||||
header:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
table {
|
||||
margin: 1em 0;
|
||||
}
|
||||
table td,
|
||||
table th {
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
pre,
|
||||
code {
|
||||
font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
|
||||
line-height: 1.5;
|
||||
}
|
||||
pre {
|
||||
font-size: 14px;
|
||||
line-height: 1.375;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
-moz-tab-size: 2;
|
||||
-o-tab-size: 2;
|
||||
tab-size: 2;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
.highlight-line {
|
||||
display: block;
|
||||
padding: 0.125em 1em;
|
||||
text-decoration: none; /* override del, ins, mark defaults */
|
||||
color: inherit; /* override del, ins, mark defaults */
|
||||
}
|
||||
|
||||
/* allow highlighting empty lines */
|
||||
.highlight-line:empty:before {
|
||||
content: " ";
|
||||
}
|
||||
/* avoid double line breaks when using display: block; */
|
||||
.highlight-line + br {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.highlight-line-isdir {
|
||||
color: #b0b0b0;
|
||||
background-color: #222;
|
||||
}
|
||||
.highlight-line-active {
|
||||
background-color: #444;
|
||||
background-color: hsla(0, 0%, 27%, .8);
|
||||
}
|
||||
.highlight-line-add {
|
||||
background-color: #45844b;
|
||||
}
|
||||
.highlight-line-remove {
|
||||
background-color: #902f2f;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.home {
|
||||
padding: 0 1rem;
|
||||
float: left;
|
||||
margin: 1rem 0; /* 16px /16 */
|
||||
font-size: 1em; /* 16px /16 */
|
||||
}
|
||||
.home :link:not(:hover) {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Nav */
|
||||
.nav {
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
float: left;
|
||||
margin-left: 1em;
|
||||
}
|
||||
.nav-item {
|
||||
display: inline-block;
|
||||
margin-right: 1em;
|
||||
}
|
||||
.nav-item a[href]:not(:hover) {
|
||||
text-decoration: none;
|
||||
}
|
||||
.nav-item-active {
|
||||
font-weight: 700;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* Posts list */
|
||||
.postlist {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
.postlist-item {
|
||||
counter-increment: start-from -1;
|
||||
}
|
||||
.postlist-item:before {
|
||||
display: inline-block;
|
||||
pointer-events: none;
|
||||
content: "" counter(start-from, decimal-leading-zero) ". ";
|
||||
line-height: 100%;
|
||||
text-align: right;
|
||||
}
|
||||
.postlist-date,
|
||||
.postlist-item:before {
|
||||
font-size: 0.8125em; /* 13px /16 */
|
||||
color: var(--darkgray);
|
||||
}
|
||||
.postlist-date {
|
||||
word-spacing: -0.5px;
|
||||
}
|
||||
.postlist-link {
|
||||
display: inline-block;
|
||||
padding: 0.25em 0.1875em; /* 4px 3px /16 */
|
||||
}
|
||||
.postlist-item-active .postlist-link {
|
||||
font-weight: bold;
|
||||
}
|
||||
.tmpl-home .postlist-link {
|
||||
font-size: 1.1875em; /* 19px /16 */
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
footer {
|
||||
padding: 1rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
/* Tags */
|
||||
.post-tag {
|
||||
display: inline-block;
|
||||
vertical-align: text-top;
|
||||
text-transform: uppercase;
|
||||
font-size: 0.625em; /* 10px /16 */
|
||||
padding: 2px 4px;
|
||||
margin-left: 0.8em; /* 8px /10 */
|
||||
background-color: var(--red);
|
||||
color: var(--white);
|
||||
border-radius: 0.25em; /* 3px /12 */
|
||||
text-decoration: none;
|
||||
}
|
||||
a[href].post-tag,
|
||||
a[href].post-tag:visited {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Warning */
|
||||
.warning {
|
||||
background-color: #ffc;
|
||||
padding: 1em 0.625em; /* 16px 10px /16 */
|
||||
}
|
||||
.warning ol:only-child {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Direct Links / Markdown Headers */
|
||||
.direct-link {
|
||||
font-family: sans-serif;
|
||||
text-decoration: none;
|
||||
font-style: normal;
|
||||
margin-left: .1em;
|
||||
}
|
||||
a[href].direct-link,
|
||||
a[href].direct-link:visited {
|
||||
color: transparent;
|
||||
}
|
||||
a[href].direct-link:focus,
|
||||
a[href].direct-link:focus:visited,
|
||||
:hover > a[href].direct-link,
|
||||
:hover > a[href].direct-link:visited {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
/* Particular classes */
|
||||
|
||||
.main-title {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.media-container {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(100px, 25%) 1fr;
|
||||
}
|
91
css/prism-base16-monokai.dark.css
Normal file
91
css/prism-base16-monokai.dark.css
Normal file
|
@ -0,0 +1,91 @@
|
|||
/* Styles for syntax highlighting inside code blocks */
|
||||
|
||||
code[class*="language-"], pre[class*="language-"] {
|
||||
font-size: 14px;
|
||||
line-height: 1.375;
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
-moz-tab-size: 2;
|
||||
-o-tab-size: 2;
|
||||
tab-size: 2;
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
background: #272822;
|
||||
color: #f8f8f2;
|
||||
}
|
||||
pre[class*="language-"] {
|
||||
padding: 1.5em 0;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
}
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
}
|
||||
.token.comment, .token.prolog, .token.doctype, .token.cdata {
|
||||
color: #75715e;
|
||||
}
|
||||
.token.punctuation {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
.token.namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
.token.operator, .token.boolean, .token.number {
|
||||
color: #fd971f;
|
||||
}
|
||||
.token.property {
|
||||
color: #f4bf75;
|
||||
}
|
||||
.token.tag {
|
||||
color: #66d9ef;
|
||||
}
|
||||
.token.string {
|
||||
color: #a1efe4;
|
||||
}
|
||||
.token.selector {
|
||||
color: #ae81ff;
|
||||
}
|
||||
.token.attr-name {
|
||||
color: #fd971f;
|
||||
}
|
||||
.token.entity, .token.url, .language-css .token.string, .style .token.string {
|
||||
color: #a1efe4;
|
||||
}
|
||||
.token.attr-value, .token.keyword, .token.control, .token.directive, .token.unit {
|
||||
color: #a6e22e;
|
||||
}
|
||||
.token.statement, .token.regex, .token.atrule {
|
||||
color: #a1efe4;
|
||||
}
|
||||
.token.placeholder, .token.variable {
|
||||
color: #66d9ef;
|
||||
}
|
||||
.token.deleted {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.token.inserted {
|
||||
border-bottom: 1px dotted #f9f8f5;
|
||||
text-decoration: none;
|
||||
}
|
||||
.token.italic {
|
||||
font-style: italic;
|
||||
}
|
||||
.token.important, .token.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.token.important {
|
||||
color: #f92672;
|
||||
}
|
||||
.token.entity {
|
||||
cursor: help;
|
||||
}
|
||||
pre > code.highlight {
|
||||
outline: 0.4em solid #f92672;
|
||||
outline-offset: .4em;
|
||||
}
|
29
feed/feed.njk
Executable file
29
feed/feed.njk
Executable file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
# Metadata comes from _data/metadata.json
|
||||
permalink: "{{ metadata.feed.path }}"
|
||||
eleventyExcludeFromCollections: true
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>{{ metadata.title }}</title>
|
||||
<subtitle>{{ metadata.feed.subtitle }}</subtitle>
|
||||
{% set absoluteUrl %}{{ metadata.feed.path | url | absoluteUrl(metadata.url) }}{% endset %}
|
||||
<link href="{{ absoluteUrl }}" rel="self"/>
|
||||
<link href="{{ metadata.url }}"/>
|
||||
<updated>{{ collections.posts | rssLastUpdatedDate }}</updated>
|
||||
<id>{{ metadata.feed.id }}</id>
|
||||
<author>
|
||||
<name>{{ metadata.author.name }}</name>
|
||||
<email>{{ metadata.author.email }}</email>
|
||||
</author>
|
||||
{%- for post in collections.posts | reverse %}
|
||||
{% set absolutePostUrl %}{{ post.url | url | absoluteUrl(metadata.url) }}{% endset %}
|
||||
<entry>
|
||||
<title>{{ post.data.title }}</title>
|
||||
<link href="{{ absolutePostUrl }}"/>
|
||||
<updated>{{ post.date | rssDate }}</updated>
|
||||
<id>{{ absolutePostUrl }}</id>
|
||||
<content type="html">{{ post.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</content>
|
||||
</entry>
|
||||
{%- endfor %}
|
||||
</feed>
|
6
feed/htaccess.njk
Normal file
6
feed/htaccess.njk
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
permalink: feed/.htaccess
|
||||
eleventyExcludeFromCollections: true
|
||||
---
|
||||
# For Apache, to show `{{ metadata.feed.filename }}` when browsing to directory /feed/ (hide the file!)
|
||||
DirectoryIndex {{ metadata.feed.filename }}
|
31
feed/json.njk
Normal file
31
feed/json.njk
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
# Metadata comes from _data/metadata.json
|
||||
permalink: "{{ metadata.jsonfeed.path }}"
|
||||
eleventyExcludeFromCollections: true
|
||||
---
|
||||
{
|
||||
"version": "https://jsonfeed.org/version/1",
|
||||
"title": "{{ metadata.title }}",
|
||||
"home_page_url": "{{ metadata.url }}",
|
||||
"feed_url": "{{ metadata.jsonfeed.url }}",
|
||||
"description": "{{ metadata.description }}",
|
||||
"author": {
|
||||
"name": "{{ metadata.author.name }}",
|
||||
"url": "{{ metadata.author.url }}"
|
||||
},
|
||||
"items": [
|
||||
{%- for post in collections.posts | reverse %}
|
||||
{%- set absolutePostUrl %}{{ post.url | url | absoluteUrl(metadata.url) }}{% endset -%}
|
||||
{
|
||||
"id": "{{ absolutePostUrl }}",
|
||||
"url": "{{ absolutePostUrl }}",
|
||||
"title": "{{ post.data.title }}",
|
||||
"content_html": {% if post.templateContent %}{{ post.templateContent | dump | safe }}{% else %}""{% endif %},
|
||||
"date_published": "{{ post.date | rssDate }}"
|
||||
}
|
||||
{%- if not loop.last -%}
|
||||
,
|
||||
{%- endif -%}
|
||||
{%- endfor %}
|
||||
]
|
||||
}
|
13
index.njk
Normal file
13
index.njk
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
layout: layouts/home.njk
|
||||
twitter: "@penpotapp"
|
||||
image: img/placeholder.png
|
||||
eleventyNavigation:
|
||||
key: Home
|
||||
order: 1
|
||||
---
|
||||
|
||||
<h1 class="main-title">Penpot documentation site</h1>
|
||||
|
||||
<p>Lorem ipsum dolor...</p>
|
||||
|
4966
package-lock.json
generated
Normal file
4966
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
44
package.json
Normal file
44
package.json
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"name": "penpot-docs",
|
||||
"version": "0.1.0",
|
||||
"description": "Documentation about Penpot project.",
|
||||
"scripts": {
|
||||
"build": "eleventy",
|
||||
"watch": "eleventy --watch",
|
||||
"serve": "eleventy --serve",
|
||||
"start": "eleventy --serve",
|
||||
"debug": "DEBUG=* eleventy"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/penpot/penpot-docs.git"
|
||||
},
|
||||
"author": {
|
||||
"name": "Penpot",
|
||||
"email": "hello@penpot.app",
|
||||
"url": "https://penpot.app/"
|
||||
},
|
||||
"license": "SEE LICENSE IN <LICENSE>",
|
||||
"bugs": {
|
||||
"url": "https://github.com/penpot/penpot-docs/issues"
|
||||
},
|
||||
"homepage": "https://docs.penpot.app",
|
||||
"devDependencies": {
|
||||
"@11ty/eleventy": "^0.11.1",
|
||||
"@11ty/eleventy-navigation": "^0.1.6",
|
||||
"@11ty/eleventy-plugin-rss": "^1.1.0",
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^3.0.6",
|
||||
"@akebifiky/remark-simple-plantuml": "^1.0.2",
|
||||
"@code-blocks/eleventy-plugin": "^0.1.7",
|
||||
"@code-blocks/prism": "^0.1.6",
|
||||
"@fec/eleventy-plugin-remark": "^2.1.0",
|
||||
"assassin-custom-plantuml": "^2.1.5",
|
||||
"eleventy-plugin-metagen": "^1.1.0",
|
||||
"eleventy-plugin-nesting-toc": "^1.2.0",
|
||||
"eleventy-plugin-youtube-embed": "^1.5.0",
|
||||
"luxon": "^1.25.0",
|
||||
"markdown-it": "^8.4.2",
|
||||
"markdown-it-anchor": "^5.2.5"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
14
sitemap.xml.njk
Normal file
14
sitemap.xml.njk
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
permalink: /sitemap.xml
|
||||
eleventyExcludeFromCollections: true
|
||||
---
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
{%- for page in collections.all %}
|
||||
{% set absoluteUrl %}{{ page.url | url | absoluteUrl(metadata.url) }}{% endset %}
|
||||
<url>
|
||||
<loc>{{ absoluteUrl }}</loc>
|
||||
<lastmod>{{ page.date | htmlDateString }}</lastmod>
|
||||
</url>
|
||||
{%- endfor %}
|
||||
</urlset>
|
Loading…
Reference in New Issue
Block a user