From 1e4c95554aa725e48a04eb874e646e5e526fd1cd Mon Sep 17 00:00:00 2001 From: Clark Du Date: Sat, 28 Oct 2017 00:20:12 +0800 Subject: [PATCH 1/2] feat: add markdown example --- examples/markdownit/README.md | 5 +++++ examples/markdownit/nuxt.config.js | 16 ++++++++++++++++ examples/markdownit/package.json | 13 +++++++++++++ examples/markdownit/pages/about.vue | 6 ++++++ examples/markdownit/pages/index.vue | 19 +++++++++++++++++++ 5 files changed, 59 insertions(+) create mode 100644 examples/markdownit/README.md create mode 100644 examples/markdownit/nuxt.config.js create mode 100644 examples/markdownit/package.json create mode 100644 examples/markdownit/pages/about.vue create mode 100644 examples/markdownit/pages/index.vue diff --git a/examples/markdownit/README.md b/examples/markdownit/README.md new file mode 100644 index 0000000000..a287cad252 --- /dev/null +++ b/examples/markdownit/README.md @@ -0,0 +1,5 @@ +# Markdown Example + +> Convert Markdown file to HTML using markdown-it. + +**See [Markdownit Module](https://github.com/nuxt-community/modules/tree/master/packages/markdownit) for easy integration with [Nuxt.js](https://nuxtjs.org).** diff --git a/examples/markdownit/nuxt.config.js b/examples/markdownit/nuxt.config.js new file mode 100644 index 0000000000..5660fb118d --- /dev/null +++ b/examples/markdownit/nuxt.config.js @@ -0,0 +1,16 @@ +module.exports = { + modules: [ + '@nuxtjs/markdownit' + ] + // [optional] markdownit options + // See https://github.com/markdown-it/markdown-it + // markdownit: { + // preset: 'default', + // linkify: true, + // breaks: true, + // use: [ + // 'markdown-it-container', + // 'markdown-it-attrs' + // ] + // } +} diff --git a/examples/markdownit/package.json b/examples/markdownit/package.json new file mode 100644 index 0000000000..fae0d3f7bb --- /dev/null +++ b/examples/markdownit/package.json @@ -0,0 +1,13 @@ +{ + "name": "nuxt-markdownit", + "version": "1.0.0", + "dependencies": { + "@nuxtjs/markdownit": "^1.1.2", + "nuxt": "latest" + }, + "scripts": { + "dev": "nuxt", + "build": "nuxt build", + "start": "nuxt start" + } +} diff --git a/examples/markdownit/pages/about.vue b/examples/markdownit/pages/about.vue new file mode 100644 index 0000000000..819feae465 --- /dev/null +++ b/examples/markdownit/pages/about.vue @@ -0,0 +1,6 @@ + diff --git a/examples/markdownit/pages/index.vue b/examples/markdownit/pages/index.vue new file mode 100644 index 0000000000..61869bd5b2 --- /dev/null +++ b/examples/markdownit/pages/index.vue @@ -0,0 +1,19 @@ + + +< From 84783a988c435c5e50e81234b112792d088030d9 Mon Sep 17 00:00:00 2001 From: Clark Du Date: Sat, 28 Oct 2017 00:38:47 +0800 Subject: [PATCH 2/2] feat: add pug example --- examples/markdownit/package.json | 3 ++- examples/markdownit/pages/about.vue | 2 +- examples/markdownit/pages/index.vue | 6 ++++-- examples/markdownit/pages/pug.vue | 17 +++++++++++++++++ 4 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 examples/markdownit/pages/pug.vue diff --git a/examples/markdownit/package.json b/examples/markdownit/package.json index fae0d3f7bb..76056fdcbb 100644 --- a/examples/markdownit/package.json +++ b/examples/markdownit/package.json @@ -3,7 +3,8 @@ "version": "1.0.0", "dependencies": { "@nuxtjs/markdownit": "^1.1.2", - "nuxt": "latest" + "nuxt": "latest", + "pug": "^2.0.0-rc.4" }, "scripts": { "dev": "nuxt", diff --git a/examples/markdownit/pages/about.vue b/examples/markdownit/pages/about.vue index 819feae465..aa487b80bb 100644 --- a/examples/markdownit/pages/about.vue +++ b/examples/markdownit/pages/about.vue @@ -1,5 +1,5 @@ -<