Skip to content

Commit d10c665

Browse files
committed
Adds silent option.
1 parent 6c9ffdc commit d10c665

File tree

6 files changed

+164
-35
lines changed

6 files changed

+164
-35
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,14 @@ import config from "config";
246246

247247
You can have any folder structure you want as long as you specify where your entry files are in `site.config.js` > `folderStructure`.
248248

249+
### sitemap.xml and feed.xml
250+
251+
A sitemap.xml and feed.xml is created when running `yarn build` and includes all files that do NOT have
252+
253+
```md
254+
silent: true
255+
```
256+
249257
#### Static Folder
250258

251259
The contents of the `static` folder will be copied directly as is to the output folder during build and development.

markdown/articles/first.md

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
---
2+
title: 'Markdown Tutorial'
3+
thumbnail: /uploads/image.jpg
4+
draft: false
5+
description: "A quick and simple markdown tutorial"
6+
---
7+
8+
Guide from [Markdown syntax guide by Atlassian](https://confluence.atlassian.com/bitbucketserver/markdown-syntax-guide-776639995.html)
9+
10+
### Headings
11+
12+
```md
13+
# This is an H1
14+
## This is an H2
15+
###### This is an H6
16+
17+
This is also an H1
18+
==================
19+
20+
This is also an H2
21+
------------------
22+
```
23+
24+
### Paragraphs
25+
Paragraphs are separated by empty lines. To create a new paragraph, press <return> twice.
26+
27+
```md
28+
Paragraph 1
29+
30+
Paragraph 2
31+
```
32+
33+
### Character styles
34+
35+
```md
36+
*Italic characters*
37+
_Italic characters_
38+
**bold characters**
39+
__bold characters__
40+
~~strikethrough text~~
41+
```
42+
43+
### Unordered list
44+
45+
```md
46+
* Item 1
47+
* Item 2
48+
* Item 3
49+
* Item 3a
50+
* Item 3b
51+
* Item 3c
52+
Ordered list
53+
1. Step 1
54+
2. Step 2
55+
3. Step 3
56+
1. Step 3.1
57+
2. Step 3.2
58+
3. Step 3.3
59+
List in list
60+
1. Step 1
61+
2. Step 2
62+
3. Step 3
63+
* Item 3a
64+
* Item 3b
65+
* Item 3c
66+
```
67+
68+
### Quotes or citations
69+
Introducing my quote:
70+
71+
```
72+
> Neque porro quisquam est qui
73+
> dolorem ipsum quia dolor sit amet,
74+
> consectetur, adipisci velit...
75+
```
76+
77+
### Inline code characters
78+
79+
```md
80+
Use the backtick to refer to a `function()`.
81+
82+
There is a literal ``backtick (`)`` here.
83+
```
84+
85+
### Code blocks
86+
87+
````md
88+
Indent every line of the block by at least 4 spaces.
89+
90+
This is a normal paragraph:
91+
92+
This is a code block.
93+
With multiple lines.
94+
95+
Alternatively, you can use 3 backtick quote marks before and after the block, like this:
96+
97+
```
98+
This is a code block
99+
```
100+
101+
To add syntax highlighting to a code block, add the name of the language immediately
102+
after the backticks:
103+
104+
```javascript
105+
var oldUnload = window.onbeforeunload;
106+
window.onbeforeunload = function() {
107+
saveCoverage();
108+
if (oldUnload) {
109+
return oldUnload.apply(this, arguments);
110+
}
111+
};
112+
```
113+
````
114+
115+
Within a code block, ampersands (&) and angle brackets (< and >) are automatically converted into HTML entities.
116+
117+
### Links to external websites
118+
119+
```md
120+
This is [an example](http://www.example.com/) inline link.
121+
122+
[This link](http://example.com/ "Title") has a title attribute.
123+
124+
Links are also auto-detected in text: http://example.com/
125+
```
126+
127+
### CSS classes {.text-center}
128+
129+
This is a paragraph with a class of "text-center" added
130+
{.text-center}
131+
132+
```md
133+
### This is a centered heading {.text-center}
134+
135+
This is a paragraph with a class of "text-center" added
136+
{.text-center}
137+
```
138+
139+
---
140+
For more information visit:
141+
142+
[www.markdowntutorial.com](https://www.markdowntutorial.com/)

markdown/articles/second.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
---
22
title: 'Sample Post #2'
33
thumbnail: /uploads/image2.jpg
4+
silent: true
45
---
56

67
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci laborum, doloremque. Repellat sapiente incidunt voluptas, placeat. Nam consectetur maxime eaque magnam nostrum, iste voluptates facilis! Quidem sequi itaque eveniet nesciunt.
78

9+
<!-- more -->
10+
811
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Adipisci corrupti commodi temporibus quaerat tempora sunt ducimus tempore provident similique error, veniam quia perferendis, libero repudiandae quo pariatur ut accusantium quibusdam.

src/css/index.styl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ a
1616
img
1717
width: 100%
1818
max-width: 100%
19+
20+
pre
21+
white-space: pre-wrap
22+
color: white
23+
background: #282923
24+
padding: 1em
1925

2026
$font-primary = 'Open Sans', "Palatino Linotype", 'Didact Gothic', Helvetica, sans-serif
2127
$font-secondary = "Open Sans", 'Didact Gothic', "Palatino Linotype", sans-serif

the-magic/build/build.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,13 @@ renderMarkdownFolder().then(files => {
116116
});
117117
});
118118

119-
let sitemap_string = files
119+
let filtered_files = files
120120
.filter(file => file.url.indexOf("404") === -1)
121121
.filter(file => file.draft !== true)
122122
.filter(file => file.url !== "/analytics")
123+
.filter(file => !file.silent)
124+
125+
let sitemap_string = filtered_files
123126
.map(file => {
124127
file.url.replace("/(.html$)/", "");
125128
file.absolute_url = url.resolve(config.site_url, file.url);
@@ -144,9 +147,7 @@ renderMarkdownFolder().then(files => {
144147
createFile("sitemap.xml", sitemap_html);
145148

146149

147-
let feed_string = files
148-
.filter(file => file.url.indexOf("404") === -1)
149-
.filter(file => !file.draft)
150+
let feed_string = filtered_files
150151
.map(file => {
151152
file.absolute_url = url.resolve(config.site_url, file.url).replace("/(.html$)/", "");
152153
return file;

0 commit comments

Comments
 (0)