12 |
13 |
14 |
26 |
--------------------------------------------------------------------------------
/src/main.js:
--------------------------------------------------------------------------------
1 | // Import main css
2 | import '~/assets/style/index.scss';
3 |
4 | // Import default layout so we don't need to import it to every page
5 | import DefaultLayout from '~/layouts/Default.vue';
6 |
7 | // The Client API can be used here. Learn more: gridsome.org/docs/client-api
8 | /* eslint-disable-next-line no-unused-vars */
9 | export default (Vue, { router, head, isClient }) => {
10 | // Set default layout as a global component
11 | Vue.component('Layout', DefaultLayout);
12 | };
13 |
--------------------------------------------------------------------------------
/gridsome.server.js:
--------------------------------------------------------------------------------
1 | // Server API makes it possible to hook into various parts of Gridsome
2 | // on server-side and add custom data to the GraphQL data layer.
3 | // Learn more: https://gridsome.org/docs/server-api
4 |
5 | // Changes here requires a server restart.
6 | // To restart press CTRL + C in terminal and run `gridsome develop`
7 |
8 | module.exports = function (api) {
9 | api.loadSource(({ addCollection }) => {
10 | // Use the Data store API here: https://gridsome.org/docs/data-store-api
11 | })
12 | }
13 |
--------------------------------------------------------------------------------
/src/components/Author.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 | {{ $static.metadata.siteName }}
11 |
12 |
13 |
A baseline Gridsome starter to get you going with Bulma.
38 |
39 |
40 |
59 |
--------------------------------------------------------------------------------
/content/posts/a-post-with-a-cover.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: A post with a cover image
3 | date: 2019-01-07
4 | published: true
5 | tags: ['Markdown','Cover Image']
6 | series: false
7 | cover_image: ./images/alexandr-podvalny-220262-unsplash.jpg
8 | canonical_url: false
9 | description: "Markdown is intended to be as easy-to-read and easy-to-write as is feasible. Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions."
10 | ---
11 |
12 | Readability, however, is emphasized above all else. A Markdown-formatted
13 | document should be publishable as-is, as plain text, without looking
14 | like it's been marked up with tags or formatting instructions.
15 |
16 | While Markdown's syntax has been influenced by several existing text-to-HTML filters -- including [Setext](http://docutils.sourceforge.net/mirror/setext.html), [atx](http://www.aaronsw.com/2002/atx/), [Textile](http://textism.com/tools/textile/), [reStructuredText](http://docutils.sourceforge.net/rst.html),
17 | [Grutatext](http://www.triptico.com/software/grutatxt.html), and [EtText](http://ettext.taint.org/doc/) -- the single biggest source of
18 | inspiration for Markdown's syntax is the format of plain text email.
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ${head}
5 |
6 |
7 |
38 |
39 | ${app}
40 | ${scripts}
41 |
42 |
--------------------------------------------------------------------------------
/gridsome.config.js:
--------------------------------------------------------------------------------
1 | // This is where project configuration and plugin options are located.
2 | // Learn more: https://gridsome.org/docs/config
3 |
4 | // Changes here requires a server restart.
5 | // To restart press CTRL + C in terminal and run `gridsome develop`
6 |
7 | module.exports = {
8 | siteName: 'Gridsome Bulma Starter',
9 | siteDescription: 'A baseline Gridsome starter to get you going with Bulma.',
10 |
11 | templates: {
12 | Post: '/:title',
13 | Tag: '/tag/:id',
14 | },
15 |
16 | plugins: [
17 | {
18 | // Create posts from markdown files
19 | use: '@gridsome/source-filesystem',
20 | options: {
21 | typeName: 'Post',
22 | path: 'content/posts/*.md',
23 | refs: {
24 | // Creates a GraphQL collection from 'tags' in front-matter and adds a reference.
25 | tags: {
26 | typeName: 'Tag',
27 | create: true,
28 | },
29 | },
30 | },
31 | },
32 | ],
33 |
34 | transformers: {
35 | // Add markdown support to all file-system sources
36 | remark: {
37 | externalLinksTarget: '_blank',
38 | externalLinksRel: ['nofollow', 'noopener', 'noreferrer'],
39 | anchorClassName: 'icon icon-link',
40 | plugins: [
41 | '@gridsome/remark-prismjs',
42 | ],
43 | },
44 | },
45 | };
46 |
--------------------------------------------------------------------------------
/src/templates/Post.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
56 |
57 |
58 |
76 |
--------------------------------------------------------------------------------
/src/assets/style/_variables.scss:
--------------------------------------------------------------------------------
1 | ////////////////////////////////////////////////
2 | // DARKLY
3 | ////////////////////////////////////////////////
4 | $grey-lighter: #dbdee0;
5 | $grey-light: #8c9b9d;
6 | $grey: darken($grey-light, 18);
7 | $grey-dark: darken($grey, 18);
8 | $grey-darker: darken($grey, 23);
9 |
10 | $orange: #e67e22;
11 | $yellow: #f1b70e;
12 | $green: #2ecc71;
13 | $turquoise: #1abc9c;
14 | $blue: #3498db;
15 | $purple: #8e44ad;
16 | $red: #e74c3c;
17 | $white-ter: #ecf0f1;
18 | $primary: #375a7f !default;
19 | $yellow-invert: #fff;
20 |
21 | $family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
22 | $family-monospace: "Inconsolata", "Consolas", "Monaco", monospace;
23 |
24 | $radius-small: 3px;
25 | $radius: .4em;
26 | $radius-large: 8px;
27 | $size-6: 15px;
28 | $size-7: .85em;
29 | $title-weight: 500;
30 | $subtitle-weight: 400;
31 | $subtitle-color: $grey-dark;
32 |
33 | $border-width: 2px;
34 | $border: $grey;
35 |
36 | $body-background-color: darken($grey-darker, 4);
37 | $body-size: 15px;
38 |
39 | $background: $grey-darker;
40 | $footer-background-color: $background;
41 | $button-background-color: $background;
42 | $button-border-color: lighten($button-background-color, 15);
43 |
44 | $footer-padding: 2rem 1rem;
45 |
46 | $title-color: #fff;
47 | $subtitle-color: $grey-light;
48 | $subtitle-strong-color: $grey-light;
49 |
50 | $text: #fff;
51 | $text-light: lighten($text, 10);
52 | $text-strong: darken($text, 5);
53 |
54 | $box-color: $text;
55 | $box-background-color: $grey-dark;
56 | $box-shadow: none;
57 |
58 | $link: $orange;
59 | $link-hover: lighten($link, 5);
60 | $link-focus: darken($link, 5);
61 | $link-active: darken($link, 5);
62 | $link-focus-border: $grey-light;
63 |
64 | $button-color: $primary;
65 | $button-hover-color: darken($text, 5); // text-dark
66 | $button-focus: darken($text, 5); // text-dark
67 | $button-active-color: darken($text, 5); // text-dark
68 | $button-disabled-background-color: $grey-light;
69 |
70 | $input-hover-color: $grey-light;
71 | $input-disabled-background-color: $grey-light;
72 | $input-disabled-border: $grey-lighter;
73 |
74 | $table-color: $text;
75 | $table-head: $grey-lighter;
76 | $table-background-color: $grey-dark;
77 | $table-cell-border: 1px solid $grey;
78 |
79 | $table-row-hover-background-color: $grey-darker;
80 | $table-striped-row-even-background-color: $grey-darker;
81 | $table-striped-row-even-hover-background-color: lighten($grey-darker, 2);
82 |
83 | $pagination-color: $link;
84 | $pagination-border-color: $border;
85 |
86 | $navbar-height: 4rem;
87 |
88 | $navbar-background-color: $primary;
89 | $navbar-item-color: $text;
90 | $navbar-item-hover-color: $link;
91 | $navbar-item-hover-background-color: transparent;
92 | $navbar-item-active-color: $link;
93 | $navbar-dropdown-arrow: #fff;
94 | $navbar-divider-background-color: rgba(0, 0, 0, 0.2);
95 | $navbar-dropdown-border-top: 1px solid $navbar-divider-background-color;
96 | $navbar-dropdown-background-color: $primary;
97 | $navbar-dropdown-item-hover-color: $grey-lighter;
98 | $navbar-dropdown-item-hover-background-color: transparent;
99 | $navbar-dropdown-item-active-background-color: transparent;
100 | $navbar-dropdown-item-active-color: $link;
101 |
102 | $dropdown-content-background-color: $background;
103 | $dropdown-item-color: $text;
104 |
105 | $progress-value-background-color: $grey-lighter;
106 |
--------------------------------------------------------------------------------
/content/posts/say-hello-to-gridsome.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Say hello to Gridsome 🎉
3 | date: 2019-02-07
4 | published: false
5 | tags: ['Markdown','Releases']
6 | canonical_url: false
7 | description: "A new static site generator baby is born. It's highly inspired by Gatsby.js (React based) but built on top of Vue.js. We have been working on it for a year and will have a beta ready soon. You can expect this baby to grow up fast!"
8 | ---
9 |
10 | A new static site generator baby is born. It's highly inspired by Gatsby.js (React based) but built on top of Vue.js. We have been working on it for a year and will have a beta ready soon. You can expect this baby to grow up fast!
11 |
12 | We think **Gridsome** is a missing piece to the Vue.js ecosystem. What Gatsby.js does for React.js is a game changer in how we build websites. React.js is excellent, but we think Vue.js is more approachable for most web designers and devs getting started with JAMstack. Gridsome is the Vue.js alternative to Gatsby.
13 |
14 | With **Gridsome** you get a **universal GraphQL layer** for all your connected data sources. It's like a single source of truth for your website data ready to be used in any page or components. Connect to any CMS or APIs like Google Spreadsheet, Airtable, Instagram Feed, local markdown files, etc.
15 |
16 | Here is an example on how to query posts from the GraphQL layer in a page:
17 |
18 |
19 | ```html
20 |
21 |
22 |
Latest blog posts
23 |
24 |
25 | {{ edge.node.title }}
26 |
27 |
28 |
29 |
30 |
31 |
32 | query Blog {
33 | allWordPressPost (limit: 5) {
34 | edges {
35 | node {
36 | _id
37 | title
38 | }
39 | }
40 | }
41 | }
42 |
43 | ```
44 |
45 | You don't need to know GraphQL or Vue to get started with Gridsome - It's a great way to get introduced to both.
46 |
47 |
48 | The GraphQL layer and all the data can be explored in a local GraphQL playground. The playground is usually located at `https://localhost:8080/___explore` when a Gridsome development project is running.
49 |
50 |
51 |
52 |
53 | #### Perfect scores on Google Lighthouse - automagically 💚
54 |
55 | One of the main goals of Gridsome is to make a framework that let you build websites that are optimized "out-of-the-box." It follows the [PRPL-pattern by Google.](https://developers.google.com/web/fundamentals/performance/prpl-pattern/) You don't need to be a performance expert to make fast websites with Gridsome. Your site gets almost perfect scores on Google lighthouse out-of-the-box. These are some of the performance steps that Gridsome takes care of:
56 |
57 | - Image compressing & lazy-loading ⚡️
58 | - CSS & JS minification ⚡️
59 | - Code-splitting ⚡️
60 | - HTML compressing ⚡️
61 | - Critical CSS (Plugin) ⚡️
62 | - Full PWA & Offline-support (plugin) ⚡️
63 |
64 |
65 | #### A better way to build websites
66 |
67 | Gridsome is built for the JAMstack workflow - a new way to build websites that gives you better performance, higher security, cheaper hosting, and a better developer experience. Generate prerendered (static) pages at build time for SEO-purpose and add powerful dynamic functionality with APIs and Vue.js.
68 |
69 | We believe the SSGs / JAMstack trend is just getting started. When you have first started to make websites this way there is no way back. You feel almost "dirty" when going back to a traditional WordPress / CMS setup.
70 |
71 | Try running the new Chrome Lighthouse (Audit tab in Developer tools) on a WordPress site - It is impossible to get good scores even with the best caching plugins and hosting. With Gridsome you don't even need caching plugins. Website optimization is taken care of at build time.
72 |
73 | This is what we think is very exciting and is why we are building Gridsome. It is the **perfect SPA & PWA front-end solution** for any headless CMS or content APIs.
74 |
75 |
76 | #### Whats next
77 |
78 | In the next couple of months we're going to continue to improve the docs, create tutorials, add more source & transformer plugins and fix bugs.
79 |
80 | #### Contribute to Gridsome
81 |
82 | We're currently just two brothers working on this, so any contribution is very welcome. We're passionate about building a faster web and make website building fun again.
83 |
84 | You can also support us by giving [a GitHub star ★](https://github.com/gridsome/gridsome/stargazers) and spread the word :)
85 |
--------------------------------------------------------------------------------
/src/assets/style/_overrides.scss:
--------------------------------------------------------------------------------
1 | hr {
2 | height: $border-width;
3 | }
4 |
5 | h6 {
6 | text-transform: uppercase;
7 | letter-spacing: 0.5px;
8 | }
9 |
10 | .hero {
11 | background-color: $grey-dark;
12 | }
13 |
14 | a {
15 | transition: all 200ms ease;
16 | }
17 |
18 | .button {
19 | transition: all 200ms ease;
20 | border-width: $border-width;
21 | color: $white;
22 |
23 | &.is-active,
24 | &.is-focused,
25 | &:active,
26 | &:focus {
27 | box-shadow: 0 0 0 2px rgba($button-focus-border-color, 0.5);
28 | }
29 | @each $name, $pair in $colors {
30 | $color: nth($pair, 1);
31 | $color-invert: nth($pair, 2);
32 |
33 | &.is-#{$name} {
34 | &.is-hovered,
35 | &:hover {
36 | background-color: lighten($color, 7.5%);
37 | }
38 |
39 | &.is-active,
40 | &.is-focused,
41 | &:active,
42 | &:focus {
43 | border-color: $color;
44 | box-shadow: 0 0 0 2px rgba($color, 0.5);
45 | }
46 | }
47 | }
48 | }
49 |
50 | .label {
51 | color: $grey-lighter;
52 | }
53 |
54 | .button,
55 | .control.has-icons-left .icon,
56 | .control.has-icons-right .icon,
57 | .input,
58 | .pagination-ellipsis,
59 | .pagination-link,
60 | .pagination-next,
61 | .pagination-previous,
62 | .select,
63 | .select select,
64 | .textarea {
65 | height: 2.5em;
66 | }
67 |
68 | .input,
69 | .textarea {
70 | transition: all 200ms ease;
71 | box-shadow: none;
72 | border-width: $border-width;
73 | padding-left: 1em;
74 | padding-right: 1em;
75 | }
76 |
77 | .select {
78 | &:after,
79 | select {
80 | border-width: $border-width;
81 | }
82 | }
83 |
84 | .control {
85 | &.has-addons {
86 | .button,
87 | .input,
88 | .select {
89 | margin-right: -$border-width;
90 | }
91 | }
92 | }
93 |
94 | .notification {
95 | background-color: $grey-dark;
96 | }
97 |
98 | .card {
99 | margin: 1em 0;
100 |
101 | $card-border-color: lighten($grey-darker, 5);
102 | box-shadow: none;
103 | border: $border-width solid $card-border-color;
104 | background-color: $grey-darker;
105 | border-radius: $radius;
106 |
107 | .card-image img {
108 | border-radius: $radius $radius 0 0;
109 | width: 100%;
110 | }
111 |
112 | .card-header {
113 | box-shadow: none;
114 | background-color: rgba($black-bis, 0.2);
115 | border-radius: $radius $radius 0 0;
116 | }
117 |
118 | .card-footer {
119 | background-color: rgba($black-bis, 0.2);
120 | }
121 |
122 | .card-footer,
123 | .card-footer-item {
124 | border-width: $border-width;
125 | border-color: $card-border-color;
126 | }
127 | }
128 |
129 | .notification {
130 | @each $name, $pair in $colors {
131 | $color: nth($pair, 1);
132 | $color-invert: nth($pair, 2);
133 |
134 | &.is-#{$name} {
135 | a:not(.button) {
136 | color: $color-invert;
137 | text-decoration: underline;
138 | }
139 | }
140 | }
141 | }
142 |
143 | .tag {
144 | border-radius: $radius;
145 | }
146 |
147 | .menu-list {
148 | a {
149 | transition: all 300ms ease;
150 | }
151 | }
152 |
153 | .modal-card-body {
154 | background-color: $grey-darker;
155 | }
156 |
157 | .modal-card-foot,
158 | .modal-card-head {
159 | border-color: $grey-dark;
160 | }
161 |
162 | .message-header {
163 | font-weight: $weight-bold;
164 | background-color: $grey-dark;
165 | color: $white;
166 | }
167 |
168 | .message-body {
169 | border-width: $border-width;
170 | border-color: $grey-dark;
171 | }
172 |
173 | .navbar {
174 | &.is-transparent {
175 | background: none;
176 | }
177 |
178 | &.is-primary .navbar-dropdown a.navbar-item.is-active {
179 | background-color: $link;
180 | }
181 |
182 | @include touch {
183 | .navbar-menu {
184 | background-color: $navbar-background-color;
185 | border-radius: 0 0 $radius $radius;
186 | }
187 | }
188 | }
189 |
190 | .hero .navbar,
191 | body > .navbar {
192 | border-radius: 0;
193 | }
194 |
195 | .pagination-link,
196 | .pagination-next,
197 | .pagination-previous {
198 | border-width: $border-width;
199 | }
200 |
201 | .panel-block,
202 | .panel-heading,
203 | .panel-tabs {
204 | border-width: $border-width;
205 |
206 | &:first-child {
207 | border-top-width: $border-width;
208 | }
209 | }
210 |
211 | .panel-heading {
212 | font-weight: $weight-bold;
213 | }
214 |
215 | .panel-tabs {
216 | a {
217 | border-width: $border-width;
218 | margin-bottom: -$border-width;
219 |
220 | &.is-active {
221 | border-bottom-color: $link-active;
222 | }
223 | }
224 | }
225 |
226 | .panel-block {
227 | &:hover {
228 | color: $link-hover;
229 |
230 | .panel-icon {
231 | color: $link-hover;
232 | }
233 | }
234 |
235 | &.is-active {
236 | .panel-icon {
237 | color: $link-active;
238 | }
239 | }
240 | }
241 |
242 | .tabs {
243 | a {
244 | border-bottom-width: $border-width;
245 | margin-bottom: -$border-width;
246 | }
247 |
248 | ul {
249 | border-bottom-width: $border-width;
250 | }
251 |
252 | &.is-boxed {
253 | a {
254 | border-width: $border-width;
255 | }
256 |
257 | li.is-active a {
258 | background-color: darken($grey-darker, 4);
259 | }
260 | }
261 |
262 | &.is-toggle {
263 | li a {
264 | border-width: $border-width;
265 | margin-bottom: 0;
266 | }
267 |
268 | li + li {
269 | margin-left: -$border-width;
270 | }
271 | }
272 | }
273 |
274 | .hero {
275 | // Colors
276 | @each $name, $pair in $colors {
277 | $color: nth($pair, 1);
278 | $color-invert: nth($pair, 2);
279 |
280 | &.is-#{$name} {
281 | .navbar {
282 | .navbar-dropdown {
283 | .navbar-item:hover {
284 | background-color: $navbar-dropdown-item-hover-background-color;
285 | }
286 | }
287 | }
288 | }
289 | }
290 | }
291 |
292 | @media screen and (min-width: 768px) {
293 | .posts {
294 | margin: 0 auto;
295 | max-width: 800px;
296 | }
297 | }
298 |
299 | .author .image {
300 | display: inline-block;
301 | width: 100%;
302 | max-width: 350px;
303 | }
304 |
--------------------------------------------------------------------------------
/content/posts/markdown-test-file.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Markdown test file
3 | date: 2019-02-06
4 | published: true
5 | tags: ['Markdown','Test files']
6 | canonical_url: false
7 | description: "Markdown is intended to be as easy-to-read and easy-to-write as is feasible. Readability, however, is emphasized above all else. A Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions."
8 | ---
9 |
10 | Markdown is intended to be as easy-to-read and easy-to-write as is feasible.Readability, however, is emphasized above all else. A Markdown-formatted
11 | document should be publishable as-is, as plain text, without looking
12 | like it's been marked up with tags or formatting instructions.
13 |
14 | While Markdown's syntax has been influenced by several existing text-to-HTML
15 | filters -- including [Setext](http://docutils.sourceforge.net/mirror/setext.html), [atx](http://www.aaronsw.com/2002/atx/), [Textile](http://textism.com/tools/textile/), [reStructuredText](http://docutils.sourceforge.net/rst.html),
16 | [Grutatext](http://www.triptico.com/software/grutatxt.html), and [EtText](http://ettext.taint.org/doc/) -- the single biggest source of
17 | inspiration for Markdown's syntax is the format of plain text email.
18 |
19 | ## Block Elements
20 |
21 | ### Paragraphs and Line Breaks
22 |
23 | A paragraph is simply one or more consecutive lines of text, separated
24 | by one or more blank lines. (A blank line is any line that looks like a
25 | blank line -- a line containing nothing but spaces or tabs is considered
26 | blank.) Normal paragraphs should not be indented with spaces or tabs.
27 |
28 | The implication of the "one or more consecutive lines of text" rule is
29 | that Markdown supports "hard-wrapped" text paragraphs. This differs
30 | significantly from most other text-to-HTML formatters (including Movable
31 | Type's "Convert Line Breaks" option) which translate every line break
32 | character in a paragraph into a ` ` tag.
33 |
34 | When you *do* want to insert a ` ` break tag using Markdown, you
35 | end a line with two or more spaces, then type return.
36 |
37 | ### Headers
38 |
39 | Markdown supports two styles of headers, [Setext] [1] and [atx] [2].
40 |
41 | Optionally, you may "close" atx-style headers. This is purely
42 | cosmetic -- you can use this if you think it looks better. The
43 | closing hashes don't even need to match the number of hashes
44 | used to open the header. (The number of opening hashes
45 | determines the header level.)
46 |
47 |
48 | ### Images
49 |
50 | Images are added with ``
51 |
52 | 
53 |
54 |
55 | ### Blockquotes
56 |
57 | Markdown uses email-style `>` characters for blockquoting. If you're
58 | familiar with quoting passages of text in an email message, then you
59 | know how to create a blockquote in Markdown. It looks best if you hard
60 | wrap the text and put a `>` before every line:
61 |
62 | > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
63 | > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
64 | > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
65 | >
66 | > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
67 | > id sem consectetuer libero luctus adipiscing.
68 |
69 | Markdown allows you to be lazy and only put the `>` before the first
70 | line of a hard-wrapped paragraph:
71 |
72 | > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
73 | consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
74 | Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
75 |
76 | > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
77 | id sem consectetuer libero luctus adipiscing.
78 |
79 | Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by
80 | adding additional levels of `>`:
81 |
82 | > This is the first level of quoting.
83 | >
84 | > > This is nested blockquote.
85 | >
86 | > Back to the first level.
87 |
88 | Blockquotes can contain other Markdown elements, including headers, lists,
89 | and code blocks:
90 |
91 | > ## This is a header.
92 | >
93 | > 1. This is the first list item.
94 | > 2. This is the second list item.
95 | >
96 | > Here's some example code:
97 | >
98 | > return shell_exec("echo $input | $markdown_script");
99 |
100 | Any decent text editor should make email-style quoting easy. For
101 | example, with BBEdit, you can make a selection and choose Increase
102 | Quote Level from the Text menu.
103 |
104 |
105 | ### Lists
106 |
107 | Markdown supports ordered (numbered) and unordered (bulleted) lists.
108 |
109 | Unordered lists use asterisks, pluses, and hyphens -- interchangably
110 | -- as list markers:
111 |
112 | * Red
113 | * Green
114 | * Blue
115 |
116 | is equivalent to:
117 |
118 | + Red
119 | + Green
120 | + Blue
121 |
122 | and:
123 |
124 | - Red
125 | - Green
126 | - Blue
127 |
128 | Ordered lists use numbers followed by periods:
129 |
130 | 1. Bird
131 | 2. McHale
132 | 3. Parish
133 |
134 | It's important to note that the actual numbers you use to mark the
135 | list have no effect on the HTML output Markdown produces. The HTML
136 | Markdown produces from the above list is:
137 |
138 | If you instead wrote the list in Markdown like this:
139 |
140 | 1. Bird
141 | 1. McHale
142 | 1. Parish
143 |
144 | or even:
145 |
146 | 3. Bird
147 | 1. McHale
148 | 8. Parish
149 |
150 | you'd get the exact same HTML output. The point is, if you want to,
151 | you can use ordinal numbers in your ordered Markdown lists, so that
152 | the numbers in your source match the numbers in your published HTML.
153 | But if you want to be lazy, you don't have to.
154 |
155 | To make lists look nice, you can wrap items with hanging indents:
156 |
157 | * Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
158 | Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
159 | viverra nec, fringilla in, laoreet vitae, risus.
160 | * Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
161 | Suspendisse id sem consectetuer libero luctus adipiscing.
162 |
163 | But if you want to be lazy, you don't have to:
164 |
165 | * Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
166 | Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
167 | viverra nec, fringilla in, laoreet vitae, risus.
168 | * Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
169 | Suspendisse id sem consectetuer libero luctus adipiscing.
170 |
171 | List items may consist of multiple paragraphs. Each subsequent
172 | paragraph in a list item must be indented by either 4 spaces
173 | or one tab:
174 |
175 | 1. This is a list item with two paragraphs. Lorem ipsum dolor
176 | sit amet, consectetuer adipiscing elit. Aliquam hendrerit
177 | mi posuere lectus.
178 |
179 | Vestibulum enim wisi, viverra nec, fringilla in, laoreet
180 | vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
181 | sit amet velit.
182 |
183 | 2. Suspendisse id sem consectetuer libero luctus adipiscing.
184 |
185 | It looks nice if you indent every line of the subsequent
186 | paragraphs, but here again, Markdown will allow you to be
187 | lazy:
188 |
189 | * This is a list item with two paragraphs.
190 |
191 | This is the second paragraph in the list item. You're
192 | only required to indent the first line. Lorem ipsum dolor
193 | sit amet, consectetuer adipiscing elit.
194 |
195 | * Another item in the same list.
196 |
197 | To put a blockquote within a list item, the blockquote's `>`
198 | delimiters need to be indented:
199 |
200 | * A list item with a blockquote:
201 |
202 | > This is a blockquote
203 | > inside a list item.
204 |
205 | To put a code block within a list item, the code block needs
206 | to be indented *twice* -- 8 spaces or two tabs:
207 |
208 | * A list item with a code block:
209 |
210 |
211 |
212 | ### Code Blocks
213 |
214 | Pre-formatted code blocks are used for writing about programming or
215 | markup source code. Rather than forming normal paragraphs, the lines
216 | of a code block are interpreted literally. Markdown wraps a code block
217 | in both `
` and `` tags.
218 |
219 | To produce a code block in Markdown, simply indent every line of the
220 | block by at least 4 spaces or 1 tab.
221 |
222 | This is a normal paragraph:
223 |
224 | This is a code block.
225 |
226 | Here is an example of AppleScript:
227 |
228 | tell application "Foo"
229 | beep
230 | end tell
231 |
232 | A code block continues until it reaches a line that is not indented
233 | (or the end of the article).
234 |
235 | Within a code block, ampersands (`&`) and angle brackets (`<` and `>`)
236 | are automatically converted into HTML entities. This makes it very
237 | easy to include example HTML source code using Markdown -- just paste
238 | it and indent it, and Markdown will handle the hassle of encoding the
239 | ampersands and angle brackets. For example, this:
240 |
241 |
244 |
245 | Regular Markdown syntax is not processed within code blocks. E.g.,
246 | asterisks are just literal asterisks within a code block. This means
247 | it's also easy to use Markdown to write about Markdown's own syntax.
248 |
249 | ```
250 | tell application "Foo"
251 | beep
252 | end tell
253 | ```
254 |
255 | ## Span Elements
256 |
257 | ### Links
258 |
259 | Markdown supports two style of links: *inline* and *reference*.
260 |
261 | In both styles, the link text is delimited by [square brackets].
262 |
263 | To create an inline link, use a set of regular parentheses immediately
264 | after the link text's closing square bracket. Inside the parentheses,
265 | put the URL where you want the link to point, along with an *optional*
266 | title for the link, surrounded in quotes. For example:
267 |
268 | This is [an example](http://example.com/) inline link.
269 |
270 | [This link](http://example.net/) has no title attribute.
271 |
272 | ### Emphasis
273 |
274 | Markdown treats asterisks (`*`) and underscores (`_`) as indicators of
275 | emphasis. Text wrapped with one `*` or `_` will be wrapped with an
276 | HTML `` tag; double `*`'s or `_`'s will be wrapped with an HTML
277 | `` tag. E.g., this input:
278 |
279 | *single asterisks*
280 |
281 | _single underscores_
282 |
283 | **double asterisks**
284 |
285 | __double underscores__
286 |
287 | ### Code
288 |
289 | To indicate a span of code, wrap it with backtick quotes (`` ` ``).
290 | Unlike a pre-formatted code block, a code span indicates code within a
291 | normal paragraph. For example:
292 |
293 | Use the `printf()` function.
294 |
--------------------------------------------------------------------------------