From f385e21a1be4ea7565617951a96fb826237a4443 Mon Sep 17 00:00:00 2001 From: John Hildenbiddle Date: Sun, 5 Jul 2020 03:15:20 -0500 Subject: [PATCH 1/8] Fix Vue compatibility (fix #790) - Fix inability to instantiate reactive Vue components by 1) handling each child of #main instead of #main itself and 2) skipping elements that are already Vue instances - Retain previous behavior of processing basic Vue rendering without the need for a markdown + + - + + - - - + + ``` -Then you can immediately write Vue code at Markdown file. `new Vue({ el: '#main' })` script is executed by default to create instance. - -*README.md* +## Basic rendering -````markdown -# Vue guide +Docsify will automatically render basic Vue content that does not require `data`, `methods`, or other instance features. -`v-for` usage. +```markdown + -```html ``` +The HTML above will render the following: + + + -```` -You can manually initialize a Vue instance. +## Advanced usage -*README.md* +Vue components and templates that require `data`, `methods`, computed properties, lifecycle hooks, etc. require manually creating a new `Vue()` instance within a ` ``` -!> In a Markdown file, only the script within the first script tag is executed. +The HTML & JavaScript above will render the following: + +
+

{{ message }}

+ + + + + {{ counter }} + +
-## Combine Vuep to write playground +!> Only the first ` - - - - - + - ``` -*README.md* -```markdown -# Vuep +Add vuep markup to a markdown file (e.g. `README.md`): - +```markdown + - ``` -?> Example Refer to the [Vuep documentation](https://qingwei-li.github.io/vuep/). + + + + + + diff --git a/index.html b/index.html index 0443d1caa..579aff260 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,7 @@ +