├── .netlify
├── static
├── favicon.ico
├── posts.json
├── README.md
├── dynamicMarkdownFiles
│ ├── test1.md
│ ├── test3.md
│ ├── test4.md
│ └── test2.md
└── markdownFiles
│ └── HomeContent.md
├── .gitignore
├── middleware
├── test.js
└── README.md
├── components
├── README.md
├── Logo.vue
└── Header.vue
├── .editorconfig
├── layouts
├── README.md
└── default.vue
├── pages
├── README.md
├── markdown.vue
├── dynamic
│ └── _slug.vue
└── index.vue
├── assets
├── README.md
└── css
│ └── main.scss
├── .eslintrc.js
├── store
├── index.js
└── README.md
├── plugins
└── README.md
├── package.json
├── README.md
└── nuxt.config.js
/.netlify:
--------------------------------------------------------------------------------
1 | {"site_id":"251f11b4-ec86-4588-9f83-5ddb456deec7","path":"dist"}
--------------------------------------------------------------------------------
/static/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/davidroyer/nuxt-markdown-example/HEAD/static/favicon.ico
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # dependencies
2 | node_modules
3 |
4 | # logs
5 | npm-debug.log
6 |
7 | # Nuxt build
8 | .nuxt
9 |
10 | # Nuxt generate
11 | dist
12 |
--------------------------------------------------------------------------------
/static/posts.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "title": "Test1",
4 | "slug": "test1"
5 | },
6 | {
7 | "title": "Test2",
8 | "slug": "test2"
9 | }
10 | ]
11 |
--------------------------------------------------------------------------------
/middleware/test.js:
--------------------------------------------------------------------------------
1 | export default function ({store}) {
2 | // If user not connected, redirect to /
3 | if (store.state.menuIsActive === true) {
4 | store.commit('toggleMenuState')
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/components/README.md:
--------------------------------------------------------------------------------
1 | # COMPONENTS
2 |
3 | The components directory contains your Vue.js Components.
4 | Nuxt.js doesn't supercharge these components.
5 |
6 | **This directory is not required, you can delete it if you don't want to use it.**
7 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 | root = true
3 |
4 | [*]
5 | indent_size = 2
6 | indent_style = space
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | [*.md]
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/layouts/README.md:
--------------------------------------------------------------------------------
1 | # LAYOUTS
2 |
3 | This directory contains your Application Layouts.
4 |
5 | More information about the usage of this directory in the documentation:
6 | https://nuxtjs.org/guide/views#layouts
7 |
8 | **This directory is not required, you can delete it if you don't want to use it.**
9 |
--------------------------------------------------------------------------------
/pages/README.md:
--------------------------------------------------------------------------------
1 | # PAGES
2 |
3 | This directory contains your Application Views and Routes.
4 | The framework reads all the .vue files inside this directory and create the router of your application.
5 |
6 | More information about the usage of this directory in the documentation:
7 | https://nuxtjs.org/guide/routing
8 |
--------------------------------------------------------------------------------
/assets/README.md:
--------------------------------------------------------------------------------
1 | # ASSETS
2 |
3 | This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
4 |
5 | More information about the usage of this directory in the documentation:
6 | https://nuxtjs.org/guide/assets#webpacked
7 |
8 | **This directory is not required, you can delete it if you don't want to use it.**
9 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | parser: 'babel-eslint',
4 | env: {
5 | browser: true,
6 | node: true
7 | },
8 | extends: 'standard',
9 | // required to lint *.vue files
10 | plugins: [
11 | 'html'
12 | ],
13 | // add your custom rules here
14 | rules: {},
15 | globals: {}
16 | }
17 |
--------------------------------------------------------------------------------
/store/index.js:
--------------------------------------------------------------------------------
1 | import Vuex from 'vuex'
2 |
3 | const createStore = () => {
4 | return new Vuex.Store({
5 | state: {
6 | menuIsActive: false
7 | },
8 | mutations: {
9 | toggleMenuState (state) {
10 | state.menuIsActive = !state.menuIsActive
11 | }
12 | }
13 | })
14 | }
15 |
16 | export default createStore
17 |
--------------------------------------------------------------------------------
/assets/css/main.scss:
--------------------------------------------------------------------------------
1 | .page-enter-active,
2 | .page-leave-active {
3 | transition: opacity 0.35s;
4 | }
5 |
6 | .page-enter,
7 | .page-leave-active {
8 | opacity: 0;
9 | }
10 |
11 | .contentWrapper section {
12 | padding: 1.25em;
13 | }
14 |
15 | @media (max-width: 679px) {
16 | .siteTitle {
17 | font-size: 1.25em !important;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/plugins/README.md:
--------------------------------------------------------------------------------
1 | # PLUGINS
2 |
3 | This directory contains your Javascript plugins that you want to run before instantiating the root vue.js application.
4 |
5 | More information about the usage of this directory in the documentation:
6 | https://nuxtjs.org/guide/plugins
7 |
8 | **This directory is not required, you can delete it if you don't want to use it.**
9 |
--------------------------------------------------------------------------------
/static/README.md:
--------------------------------------------------------------------------------
1 | # STATIC
2 |
3 | This directory contains your static files.
4 | Each file inside this directory is mapped to /.
5 |
6 | Example: /static/robots.txt is mapped as /robots.txt.
7 |
8 | More information about the usage of this directory in the documentation:
9 | https://nuxtjs.org/guide/assets#static
10 |
11 | **This directory is not required, you can delete it if you don't want to use it.**
12 |
--------------------------------------------------------------------------------
/middleware/README.md:
--------------------------------------------------------------------------------
1 | # MIDDLEWARE
2 |
3 | This directory contains your Application Middleware.
4 | The middleware lets you define custom function to be ran before rendering a page or a group of pages (layouts).
5 |
6 | More information about the usage of this directory in the documentation:
7 | https://nuxtjs.org/guide/routing#middleware
8 |
9 | **This directory is not required, you can delete it if you don't want to use it.**
10 |
--------------------------------------------------------------------------------
/store/README.md:
--------------------------------------------------------------------------------
1 | # STORE
2 |
3 | This directory contains your Vuex Store files.
4 | Vuex Store option is implemented in the Nuxt.js framework.
5 | Creating a index.js file in this directory activate the option in the framework automatically.
6 |
7 | More information about the usage of this directory in the documentation:
8 | https://nuxtjs.org/guide/vuex-store
9 |
10 | **This directory is not required, you can delete it if you don't want to use it.**
11 |
--------------------------------------------------------------------------------
/pages/markdown.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Markdown Main Page
6 |
7 |
8 | Testing Netlify build
9 |
10 |
11 |
12 |
13 |
14 |
15 |
28 |
29 |
32 |
--------------------------------------------------------------------------------
/static/dynamicMarkdownFiles/test1.md:
--------------------------------------------------------------------------------
1 | An h1 header
2 | ============
3 |
4 | Paragraphs are separated by a blank line.
5 |
6 | 2nd paragraph. *Italic*, **bold**, and `monospace`. Itemized lists
7 | look like:
8 |
9 | * this one
10 | * that one
11 | * the other one
12 |
13 | Note that --- not considering the asterisk --- the actual text
14 | content starts at 4-columns in.
15 |
16 | > Block quotes are
17 | > written like so.
18 | >
19 | > They can span multiple paragraphs,
20 | > if you like.
21 |
22 | Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all
23 | in chapters 12--14"). Three dots ... will be converted to an ellipsis.
24 | Unicode is supported. ☺
25 |
--------------------------------------------------------------------------------
/static/dynamicMarkdownFiles/test3.md:
--------------------------------------------------------------------------------
1 | This is Test3 file
2 | ============
3 |
4 | Paragraphs are separated by a blank line.
5 |
6 | 2nd paragraph. *Italic*, **bold**, and `monospace`. Itemized lists
7 | look like:
8 |
9 | * this one
10 | * that one
11 | * the other one
12 |
13 | Note that --- not considering the asterisk --- the actual text
14 | content starts at 4-columns in.
15 |
16 | > Block quotes are
17 | > written like so.
18 | >
19 | > They can span multiple paragraphs,
20 | > if you like.
21 |
22 | Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all
23 | in chapters 12--14"). Three dots ... will be converted to an ellipsis.
24 | Unicode is supported. ☺
25 |
--------------------------------------------------------------------------------
/static/dynamicMarkdownFiles/test4.md:
--------------------------------------------------------------------------------
1 | This is Test4 file
2 | ============
3 |
4 | Paragraphs are separated by a blank line.
5 |
6 | 2nd paragraph. *Italic*, **bold**, and `monospace`. Itemized lists
7 | look like:
8 |
9 | * this one
10 | * that one
11 | * the other one
12 |
13 | Note that --- not considering the asterisk --- the actual text
14 | content starts at 4-columns in.
15 |
16 | > Block quotes are
17 | > written like so.
18 | >
19 | > They can span multiple paragraphs,
20 | > if you like.
21 |
22 | Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all
23 | in chapters 12--14"). Three dots ... will be converted to an ellipsis.
24 | Unicode is supported. ☺
25 |
--------------------------------------------------------------------------------
/static/markdownFiles/HomeContent.md:
--------------------------------------------------------------------------------
1 | The markdown files for this example live in the directory **markdownFiles**, inside the **static** folder.
2 |
3 | They are imported using webpack's import capability and loadered with the markdown-it module via [Nuxt.js modules](https://github.com/nuxt-community/modules).
4 |
5 | This content you are reading at this very moment is actually a markdown file. It's titled home.md and can find it in the **markdownFiles** directory.
6 |
7 | Inside the **markdownFiles** directory, you will find 2 other files
8 | - test1.md
9 | - test2.md
10 |
11 | They are used to show the dynamic import ability of webpack and that can be seen in **dynamic/_slug.vue**
12 | Pretty cool huh?
13 |
--------------------------------------------------------------------------------
/static/dynamicMarkdownFiles/test2.md:
--------------------------------------------------------------------------------
1 | # An exhibit of Markdown
2 |
3 | This note demonstrates some of what [Markdown][1] is capable of doing.
4 |
5 | *Note: Feel free to play with this page. Unlike regular notes, this doesn't automatically save itself.*
6 |
7 | ## Basic formatting
8 |
9 | Paragraphs can be written like so. A paragraph is the basic block of Markdown. A paragraph is what text will turn into when there is no reason it should become anything else.
10 |
11 | Paragraphs must be separated by a blank line. Basic formatting of *italics* and **bold** is supported. This *can be **nested** like* so.
12 |
13 | ## Lists
14 |
15 | ### Ordered list
16 |
17 | 1. Item 1
18 | 2. A second item
19 | 3. Number 3
20 | 4. Ⅳ
21 |
--------------------------------------------------------------------------------
/pages/dynamic/_slug.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |