writr 1.9.11 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -135
- package/bin/writr.mjs +8 -0
- package/dist/builder.d.ts +33 -0
- package/dist/builder.js +181 -0
- package/dist/console.d.ts +22 -0
- package/dist/console.js +120 -0
- package/dist/github.d.ts +22 -0
- package/dist/github.js +74 -0
- package/dist/helpers/markdown.d.ts +10 -0
- package/dist/helpers/markdown.js +24 -0
- package/dist/helpers.d.ts +7 -0
- package/dist/helpers.js +58 -0
- package/dist/options.d.ts +12 -0
- package/dist/options.js +47 -0
- package/dist/writr.d.ts +23 -0
- package/dist/writr.js +153 -0
- package/init/favicon.svg +1 -0
- package/init/logo.png +0 -0
- package/init/variables.css +30 -0
- package/init/writr.config.cjs +10 -0
- package/package.json +44 -66
- package/template/css/highlight/highlight.min.js +1433 -0
- package/template/css/highlight/styles/base16/dracula.min.css +7 -0
- package/template/css/home.css +307 -0
- package/template/css/index.css +919 -0
- package/template/includes/footer.hbs +10 -0
- package/template/includes/header.hbs +17 -0
- package/template/includes/landing/content.hbs +63 -0
- package/template/includes/landing/hero.hbs +3 -0
- package/template/includes/scripts.hbs +4 -0
- package/template/index.hbs +16 -0
- package/template/releases.hbs +45 -0
- package/bin/writr.js +0 -7
- package/init/article-complex.md +0 -40
- package/init/article-ejs.md +0 -40
- package/init/article-unpublished.md +0 -11
- package/init/article1-simple.md +0 -13
- package/init/article1.md +0 -11
- package/init/article2.md +0 -14
- package/init/big-content.md +0 -11
- package/init/config.json +0 -9
- package/init/images/Introducing Docula 1.png +0 -0
- package/init/images/Introducing Docula 2.jpeg +0 -0
- package/init/images/Introducing Docula 3.png +0 -0
- package/init/images/Introducing Docula 4.png +0 -0
- package/init/permalink-test.md +0 -13
- package/init/templates/index.hjs +0 -13
- package/init/templates/partials/header.hjs +0 -2
- package/init/templates/post.hjs +0 -19
- package/init/templates/post2.hjs +0 -17
- package/init/templates/post3.ejs +0 -7
- package/init/templates/tag.hjs +0 -9
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<meta charset="UTF-8" />
|
|
2
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
3
|
+
<link rel="stylesheet" href="/css/variables.css" />
|
|
4
|
+
<link rel="stylesheet" href="/css/index.css" />
|
|
5
|
+
<link rel="stylesheet" href="/css/home.css" />
|
|
6
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
7
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
8
|
+
<link
|
|
9
|
+
href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap"
|
|
10
|
+
rel="stylesheet"
|
|
11
|
+
/>
|
|
12
|
+
<link
|
|
13
|
+
rel="stylesheet"
|
|
14
|
+
href="https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.3/gh-fork-ribbon.min.css"
|
|
15
|
+
/>
|
|
16
|
+
<link rel="stylesheet" href="/css/highlight/styles/base16/dracula.min.css" />
|
|
17
|
+
<link rel="icon" href="/favicon.ico" />
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<article class="home-container">
|
|
2
|
+
<div class="content">{{{content}}}</div>
|
|
3
|
+
|
|
4
|
+
{{#if github}}
|
|
5
|
+
{{#if github.contributors}}
|
|
6
|
+
<div class="content-container">
|
|
7
|
+
<h2 class="home-title">Contributors</h2>
|
|
8
|
+
<div class="facepile-container">
|
|
9
|
+
<div class="facepile">
|
|
10
|
+
{{#each github.contributors}}
|
|
11
|
+
<a
|
|
12
|
+
href="{{html_url}}"
|
|
13
|
+
target="_blank"
|
|
14
|
+
title="{{login}}"
|
|
15
|
+
rel="noopener noreferrer"
|
|
16
|
+
>
|
|
17
|
+
<img src="{{avatar_url}}" alt="{{login}}" />
|
|
18
|
+
</a>
|
|
19
|
+
{{/each}}
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
{{/if}}
|
|
24
|
+
|
|
25
|
+
{{#if github.releases}}
|
|
26
|
+
<div class="content-container">
|
|
27
|
+
<h2 class="home-title">Latest's Releases</h2>
|
|
28
|
+
{{#each github.releases as |release|}}
|
|
29
|
+
{{#if (lt @index 3)}}
|
|
30
|
+
<div class="release">
|
|
31
|
+
<div class="release-header">
|
|
32
|
+
<a
|
|
33
|
+
class="release-title"
|
|
34
|
+
href="{{release.html_url}}"
|
|
35
|
+
target="_blank"
|
|
36
|
+
rel="noopener noreferrer"
|
|
37
|
+
>{{release.name}}</a>
|
|
38
|
+
<span class="release-date">{{#moment
|
|
39
|
+
release.published_at "MMMM DD, yyyy"
|
|
40
|
+
}}{{/moment}}
|
|
41
|
+
</span>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="release-body">
|
|
44
|
+
{{#if release.body}}
|
|
45
|
+
{{#markdown}}{{release.body}}{{/markdown}}
|
|
46
|
+
{{/if}}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
{{/if}}
|
|
50
|
+
{{/each}}
|
|
51
|
+
|
|
52
|
+
{{#if (gt github.releases.length 6)}}
|
|
53
|
+
<div>
|
|
54
|
+
<a class="release-btn" href="/releases">
|
|
55
|
+
All Releases
|
|
56
|
+
<span>→</span>
|
|
57
|
+
</a>
|
|
58
|
+
</div>
|
|
59
|
+
{{/if}}
|
|
60
|
+
</div>
|
|
61
|
+
{{/if}}
|
|
62
|
+
{{/if}}
|
|
63
|
+
</article>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
{{> header }}
|
|
5
|
+
<title>{{ siteTitle }}</title>
|
|
6
|
+
</head>
|
|
7
|
+
|
|
8
|
+
<body>
|
|
9
|
+
{{> landing/hero }}
|
|
10
|
+
<a class="github-fork-ribbon" href="https://github.com/jaredwray/writr" data-ribbon="Fork me on GitHub" title="Fork me on GitHub">Fork me on GitHub</a>
|
|
11
|
+
{{> landing/content }}
|
|
12
|
+
{{> footer}}
|
|
13
|
+
|
|
14
|
+
{{> scripts }}
|
|
15
|
+
</body>
|
|
16
|
+
</html>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
{{> header }}
|
|
5
|
+
<title>{{siteTitle}} Releases</title>
|
|
6
|
+
</head>
|
|
7
|
+
|
|
8
|
+
<body>
|
|
9
|
+
{{> landing/hero }}
|
|
10
|
+
<a class="github-fork-ribbon" href="https://github.com/jaredwray/writr" data-ribbon="Fork me on GitHub" title="Fork me on GitHub">Fork me on GitHub</a>
|
|
11
|
+
<main class="home-container">
|
|
12
|
+
<div class="content-container versions-container">
|
|
13
|
+
<h2 class="home-title">Releases</h2>
|
|
14
|
+
{{#if github}}
|
|
15
|
+
{{#if github.releases}}
|
|
16
|
+
{{#each github.releases as |release|}}
|
|
17
|
+
<div class="release">
|
|
18
|
+
<div class="release-header">
|
|
19
|
+
<a
|
|
20
|
+
class="release-title"
|
|
21
|
+
href="{{release.html_url}}"
|
|
22
|
+
target="_blank"
|
|
23
|
+
rel="noopener noreferrer"
|
|
24
|
+
>{{release.name}}</a>
|
|
25
|
+
<span class="release-date">{{#moment
|
|
26
|
+
release.published_at "MMMM DD, yyyy"
|
|
27
|
+
}}{{/moment}}
|
|
28
|
+
</span>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="release-body">
|
|
31
|
+
{{#if release.body}}
|
|
32
|
+
{{#markdown}}{{release.body}}{{/markdown}}
|
|
33
|
+
{{/if}}
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
{{/each}}
|
|
37
|
+
{{/if}}
|
|
38
|
+
{{/if}}
|
|
39
|
+
</div>
|
|
40
|
+
</main>
|
|
41
|
+
{{> footer}}
|
|
42
|
+
|
|
43
|
+
{{> scripts }}
|
|
44
|
+
</body>
|
|
45
|
+
</html>
|
package/bin/writr.js
DELETED
package/init/article-complex.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 'Docula: Persistent Links and Styles!'
|
|
3
|
-
tags:
|
|
4
|
-
- Github
|
|
5
|
-
- Open Source
|
|
6
|
-
- Docula
|
|
7
|
-
date: 2017-03-07
|
|
8
|
-
layout: post2
|
|
9
|
-
featured_image: Docula_%20Persistent%20Links%20and%20Styles%201.jpeg
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-

|
|
13
|
-
|
|
14
|
-
## Docula: Persistent Links and Styles!
|
|
15
|
-
|
|
16
|
-
In our last update, we simplified the modules down to two ([docula-ui](https://www.npmjs.com/package/docula-ui), and [docula-core](https://www.npmjs.com/package/docula-core)) and also added In-Memory data stores as the default. Now with this latest update, we made it so that you can do [persistent linking](https://docu.la/docs/article/configuration/deeplinks) and [customize the interface](https://docu.la/docs/article/configuration/customization) it very easily.
|
|
17
|
-
|
|
18
|
-
### Persistent Linking
|
|
19
|
-
|
|
20
|
-
There are many times a document can move around in a GitHub repository, but you want to keep to an URL that works. [Check out how to do it here!](https://docu.la/docs/article/configuration/deeplinks)
|
|
21
|
-
|
|
22
|
-
### Styling! Let’s Get Started
|
|
23
|
-
|
|
24
|
-
The first step is to see how we did this. Since we use [GitHub](https://github.com/) for our knowledge base repository, it made sense to extend the configuration for skinning there. Here is what the [Fons repository](https://github.com/fonsio/public-kb) looks like with the `style.css` and `navigation.html` file in the root.
|
|
25
|
-
|
|
26
|
-

|
|
27
|
-
|
|
28
|
-
The configuration for your [docula-ui](https://www.npmjs.com/package/docula-ui) is easy to do the config. You will want to add in the style.css path and navigation.html path. Also, if you have a customized logo, you can do that. Here is an example that we use for Fons.
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
Docula.install(app, '/help', {git: 'https://github.com/fonsio/public-kb.git',pageTitle: 'Fons',logo: 'https://fons.io/n/img/fons-logo-300x85.png',redis: redisConfig(),elasticsearch: elasticConfig(),topNavigation: 'navigation.html',cssTheme: 'theme.scss'});
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Yep, its as simple as that and you can see the style.css and navigation.html examples here: [https://github.com/fonsio/public-kb](https://github.com/fonsio/public-kb)
|
|
35
|
-
|
|
36
|
-
<div>
|
|
37
|
-
<p>foo</p>
|
|
38
|
-
</div>
|
|
39
|
-
***Happy Styling!***
|
|
40
|
-
|
package/init/article-ejs.md
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 'Docula: EJS Style'
|
|
3
|
-
tags:
|
|
4
|
-
- Github
|
|
5
|
-
- Open Source
|
|
6
|
-
- Docula
|
|
7
|
-
date: 2017-03-07
|
|
8
|
-
layout: post3
|
|
9
|
-
featured_image: Docula_%20Persistent%20Links%20and%20Styles%201.jpeg
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-

|
|
13
|
-
|
|
14
|
-
## Docula: Persistent Links and Styles!
|
|
15
|
-
|
|
16
|
-
In our last update, we simplified the modules down to two ([docula-ui](https://www.npmjs.com/package/docula-ui), and [docula-core](https://www.npmjs.com/package/docula-core)) and also added In-Memory data stores as the default. Now with this latest update, we made it so that you can do [persistent linking](https://docu.la/docs/article/configuration/deeplinks) and [customize the interface](https://docu.la/docs/article/configuration/customization) it very easily.
|
|
17
|
-
|
|
18
|
-
### Persistent Linking
|
|
19
|
-
|
|
20
|
-
There are many times a document can move around in a GitHub repository, but you want to keep to an URL that works. [Check out how to do it here!](https://docu.la/docs/article/configuration/deeplinks)
|
|
21
|
-
|
|
22
|
-
### Styling! Let’s Get Started
|
|
23
|
-
|
|
24
|
-
The first step is to see how we did this. Since we use [GitHub](https://github.com/) for our knowledge base repository, it made sense to extend the configuration for skinning there. Here is what the [Fons repository](https://github.com/fonsio/public-kb) looks like with the `style.css` and `navigation.html` file in the root.
|
|
25
|
-
|
|
26
|
-

|
|
27
|
-
|
|
28
|
-
The configuration for your [docula-ui](https://www.npmjs.com/package/docula-ui) is easy to do the config. You will want to add in the style.css path and navigation.html path. Also, if you have a customized logo, you can do that. Here is an example that we use for Fons.
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
Docula.install(app, '/help', {git: 'https://github.com/fonsio/public-kb.git',pageTitle: 'Fons',logo: 'https://fons.io/n/img/fons-logo-300x85.png',redis: redisConfig(),elasticsearch: elasticConfig(),topNavigation: 'navigation.html',cssTheme: 'theme.scss'});
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Yep, its as simple as that and you can see the style.css and navigation.html examples here: [https://github.com/fonsio/public-kb](https://github.com/fonsio/public-kb)
|
|
35
|
-
|
|
36
|
-
<div>
|
|
37
|
-
<p>foo</p>
|
|
38
|
-
</div>
|
|
39
|
-
***Happy Styling!***
|
|
40
|
-
|
package/init/article1-simple.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 'Article Simple'
|
|
3
|
-
date: 2018-15-01
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-

|
|
7
|
-
|
|
8
|
-
## Docula: Persistent Links and Styles!
|
|
9
|
-
|
|
10
|
-
In our last update, we simplified the modules down to two (<u>[docula-ui](https://www.npmjs.com/package/docula-ui)</u>, and <u>[docula-core](https://www.npmjs.com/package/docula-core))</u> and also added In-Memory data stores as the default. Now with this latest update, we made it so that you can do <u>[persistent linking](https://docu.la/docs/article/configuration/deeplinks)</u> and <u>[customize the interface](https://docu.la/docs/article/configuration/customization)</u> it very easily.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
package/init/article1.md
DELETED
package/init/article2.md
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Tesla Model 3
|
|
3
|
-
author: Elon Musk
|
|
4
|
-
url: all-about-the-tesla-model-3
|
|
5
|
-
date: 2016-08-12
|
|
6
|
-
publishedAt: 6/25/2017
|
|
7
|
-
keywords: tesla, model 3, elon, musk
|
|
8
|
-
categories: muskified, nice3
|
|
9
|
-
tags: tesla, model 3,Whale,cool
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
How now brown cow.
|
|
13
|
-
|
|
14
|
-
This is how we do it
|
package/init/big-content.md
DELETED
package/init/config.json
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/init/permalink-test.md
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: 'Article Perm'
|
|
3
|
-
date: 2018-12-04
|
|
4
|
-
permalink: '/foo/crazy/url/article-perm'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-

|
|
8
|
-
|
|
9
|
-
## Getting Persistent links in a blog document is critical
|
|
10
|
-
|
|
11
|
-
In our last update, we simplified the modules down to two (<u>[docula-ui](https://www.npmjs.com/package/docula-ui)</u>, and <u>[docula-core](https://www.npmjs.com/package/docula-core))</u> and also added In-Memory data stores as the default. Now with this latest update, we made it so that you can do <u>[persistent linking](https://docu.la/docs/article/configuration/deeplinks)</u> and <u>[customize the interface](https://docu.la/docs/article/configuration/customization)</u> it very easily.
|
|
12
|
-
|
|
13
|
-
|
package/init/templates/index.hjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{{#each posts}}
|
|
2
|
-
<p>{{formatDate date "MM/DD/YYYY"}}</p>
|
|
3
|
-
<p><a href="{{url}}">{{title}} - {{author}}</a></p>
|
|
4
|
-
{{/each}}
|
|
5
|
-
|
|
6
|
-
<p>Tags: <br />
|
|
7
|
-
<ul>
|
|
8
|
-
{{#each tags}}
|
|
9
|
-
<li><a href="{{id}}">{{name}}</a></li>{{/each}}
|
|
10
|
-
</ul>
|
|
11
|
-
</p>
|
|
12
|
-
|
|
13
|
-
{{formatDate "" "YYYY"}}
|
package/init/templates/post.hjs
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<h1>Post</h1>
|
|
2
|
-
|
|
3
|
-
{{> header}}
|
|
4
|
-
|
|
5
|
-
<p>{{post.title}}</p>
|
|
6
|
-
<p>{{post.author}}</p>
|
|
7
|
-
<p>{{{post.body}}}</p>
|
|
8
|
-
|
|
9
|
-
<p>{{post.matter.featured_image}}</p>
|
|
10
|
-
|
|
11
|
-
<p>{{previousPost.id}}</p>
|
|
12
|
-
<p>{{nextPost.id}}</p>
|
|
13
|
-
|
|
14
|
-
<h1>Tags</h1>
|
|
15
|
-
<ul>
|
|
16
|
-
{{#each tags}}
|
|
17
|
-
<li>{{name}}</li>
|
|
18
|
-
{{/each}}
|
|
19
|
-
</ul>
|
package/init/templates/post2.hjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<h1>Post 2</h1>
|
|
2
|
-
|
|
3
|
-
<p>{{post.title}}</p>
|
|
4
|
-
<p>{{post.author}}</p>
|
|
5
|
-
<p>{{{post.body}}}</p>
|
|
6
|
-
|
|
7
|
-
<p>{{post.matter.featured_image}}</p>
|
|
8
|
-
|
|
9
|
-
<p>{{previousPost.id}}</p>
|
|
10
|
-
<p>{{nextPost.id}}</p>
|
|
11
|
-
|
|
12
|
-
<h1>Tags</h1>
|
|
13
|
-
<ul>
|
|
14
|
-
{{#each tags}}
|
|
15
|
-
<li>{{name}}</li>
|
|
16
|
-
{{/each}}
|
|
17
|
-
</ul>
|
package/init/templates/post3.ejs
DELETED