VuePress: Documentation Made Easy

A presentation at DevFestDC in June 2018 in Arlington County, Arlington, VA, USA by Ben Hong

Slide 1

Slide 1

VUEPRESS DOCUMENTATION MADE EASY By Ben Hong www.bencodezen.com DEVFEST DC 2018

Slide 2

Slide 2

BEFORE WE GET STARTED... YOU CAN FIND THE SLIDES HERE: https://www.twitter.com/bencodezen AND FOR SOCIAL MEDIA POSTS: #vuepress

Slide 3

Slide 3

BEN HONG Senior UI Developer @ POLITICO @bencodezen

Slide 4

Slide 4

VUEDC https://www.vuedc.io BEN HONG Senior UI Developer @ POLITICO @bencodezen

Slide 5

Slide 5

VUEDC https://www.vuedc.io BEN HONG Senior UI Developer @ POLITICO @bencodezen VUEMEETUPS https://www.vuemeetups.org

Slide 6

Slide 6

Slide 7

Slide 7

“ Documentation can be difficult, but it is the key to any project's long term success.

Slide 8

Slide 8

README.MD

Slide 9

Slide 9

CONFLUENCE

Slide 10

Slide 10

CONFLUENCE

Slide 11

Slide 11

BUILD YOUR OWN

Slide 12

Slide 12

BUILD YOUR OWN What tech stack do you use?

Slide 13

Slide 13

BUILD YOUR OWN What tech stack do you use? What does the design look like?

Slide 14

Slide 14

BUILD YOUR OWN What tech stack do you use? What does the design look like? What features should it have?

Slide 15

Slide 15

BUILD YOUR OWN What tech stack do you use? What does the design look like? What features should it have? Is it easy to maintain?

Slide 16

Slide 16

BUILD YOUR OWN What tech stack do you use? What does the design look like? What features should it have? Is it easy to maintain? Who is going to pay for this?

Slide 17

Slide 17

Slide 18

Slide 18

Slide 19

Slide 19

LIVING & GOOD DOCUMENTATION IS HARD

Slide 20

Slide 20

ENTER VUEPRESS

Slide 21

Slide 21

“ VuePress is a static site generator with a Vue-powered theming system that comes with a default theme optimized for technical documentation.

Slide 22

Slide 22

WHAT MAKES VUEPRESS GREAT?

Slide 23

Slide 23

WHAT MAKES VUEPRESS GREAT? Provides an incredible default theme that allows you to focus on what's important: writing documentation

Slide 24

Slide 24

DEFAULT THEME FEATURES

Slide 25

Slide 25

DEFAULT THEME FEATURES 1. Homepage

Slide 26

Slide 26

DEFAULT THEME FEATURES 1. Homepage 2. Navbar

Slide 27

Slide 27

DEFAULT THEME FEATURES 1. Homepage 2. Navbar 3. Sidebar

Slide 28

Slide 28

DEFAULT THEME FEATURES 1. Homepage 2. Navbar 3. Sidebar 4. Built-in Search

Slide 29

Slide 29

DEFAULT THEME FEATURES 1. Homepage 2. Navbar 3. Sidebar 4. Built-in Search 5. Git Repo

Slide 30

Slide 30

DEFAULT THEME FEATURES 1. Homepage 2. Navbar 3. Sidebar 4. Built-in Search 5. Git Repo 6. Last Updated & Edit links

Slide 31

Slide 31

WHAT MAKES VUEPRESS GREAT? Provides an incredible default theme that allows you to focus on what's important: writing documentation

Slide 32

Slide 32

WHAT MAKES VUEPRESS GREAT? Provides an incredible default theme that allows you to focus on what's important: writing documentation It leverages technology and languages that developers are already comfortable with

Slide 33

Slide 33

THINGS YOU NEED TO KNOW

Slide 34

Slide 34

THINGS YOU NEED TO KNOW 1) npm install / npm run dev

Slide 35

Slide 35

THINGS YOU NEED TO KNOW 1) npm install / npm run dev 2) Markdown syntax

Slide 36

Slide 36

THINGS YOU NEED TO KNOW 1) npm install / npm run dev 2) Markdown syntax 3) Git

Slide 37

Slide 37

THINGS YOU NEED TO KNOW 1) npm install / npm run dev 2) Markdown syntax 3) Git 4) . . . That's it

Slide 38

Slide 38

WHAT MAKES VUEPRESS GREAT? Provides an incredible default theme that allows you to focus on what's important: writing documentation It leverages technology and languages that developers are already comfortable with

Slide 39

Slide 39

WHAT MAKES VUEPRESS GREAT? Provides an incredible default theme that allows you to focus on what's important: writing documentation It leverages technology and languages that developers are already comfortable with Contains built-in markdown extensions that are optimized for technical documentation

Slide 40

Slide 40

COOL MARKDOWN EXTENSIONS

Slide 41

Slide 41

COOL MARKDOWN EXTENSIONS 1. Emojis

Slide 42

Slide 42

COOL MARKDOWN EXTENSIONS 1. Emojis 2. Front Matter

Slide 43

Slide 43

COOL MARKDOWN EXTENSIONS 1. Emojis 2. Front Matter 3. GitHub-Style Tables

Slide 44

Slide 44

COOL MARKDOWN EXTENSIONS 1. Emojis 2. Front Matter 3. GitHub-Style Tables 4. Code Syntax Highlighting

Slide 45

Slide 45

COOL MARKDOWN EXTENSIONS 1. Emojis 2. Front Matter 3. GitHub-Style Tables 4. Code Syntax Highlighting 5. Line Highlighting in Code Blocks

Slide 46

Slide 46

COOL MARKDOWN EXTENSIONS 1. Emojis 2. Front Matter 3. GitHub-Style Tables 4. Code Syntax Highlighting 5. Line Highlighting in Code Blocks 6. Custom Containers

Slide 47

Slide 47

WHAT MAKES VUEPRESS GREAT? Provides an incredible default theme that allows you to focus on what's important: writing documentation It leverages technology and languages that developers are already comfortable with Contains built-in markdown extensions that are optimized for technical documentation

Slide 48

Slide 48

WHAT MAKES VUEPRESS GREAT? Provides an incredible default theme that allows you to focus on what's important: writing documentation It leverages technology and languages that developers are already comfortable with Contains built-in markdown extensions that are optimized for technical documentation Every page generated by VuePress has its own prerendered static HTML, providing great loading performance and is SEO-friendly

Slide 49

Slide 49

Slide 50

Slide 50

“ VuePress is a static site generator with a Vue-powered theming system that comes with a default theme optimized for technical documentation.

Slide 51

Slide 51

“ VuePress is a static site generator with a Vue-powered theming system that comes with a default theme optimized for technical documentation.

Slide 52

Slide 52

VUE.JS TLDR;

Slide 53

Slide 53

“ Vue is a progressive framework for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable.

Slide 54

Slide 54

https://stateofjs.com/2017/front-end/results/

Slide 55

Slide 55

THREE VUE.JS FEATURES

Slide 56

Slide 56

DECLARATIVE RENDERING <div id="app"> <h1>Hello {{ conference }}</h1> </div> <script> var app = new Vue({ el: '#app', data() { return { conference: 'DevFestDC!' } } }) </script>

Slide 57

Slide 57

DECLARATIVE RENDERING <div id="app"> <h1>Hello {{ conference }}</h1> </div> <script> var app = new Vue({ el: '#app', data() { return { conference: 'DevFestDC!' } } }) </script> Hello DevFestDC!

Slide 58

Slide 58

DIRECTIVES <div id="app"> <h1>Front-End Trifecta</h1> <ul> <li v-for="language in languages"> {{ language }} </li> </ul> </div> <script> var app = new Vue({ el: '#app', data() { return { languages: [ 'HTML', 'CSS', 'JavaScript' ] } } }) </script>

Slide 59

Slide 59

DIRECTIVES <div id="app"> <h1>Front-End Trifecta</h1> <ul> <li v-for="language in languages"> {{ language }} </li> </ul> </div> <script> var app = new Vue({ el: '#app', data() { return { languages: [ 'HTML', 'CSS', 'JavaScript' ] } } }) </script> Front-End Trifecta HTML CSS JavaScript

Slide 60

Slide 60

SINGLE FILE COMPONENTS <template> <div> <h2 class="title">Single File Components</h2> <p>They are {{ adjective }}!</p> </div> </template> <script> export default { name: 'SimpleComponent', data() { return { adjective: 'game changing' } } } </script> <style> .title { font-color: #BADA55; } </style>

Slide 61

Slide 61

SINGLE FILE COMPONENTS <template> <div> <h1>Single File Components In Action!</h1> <SimpleComponent /> <p>And we have some text here</p> <SimpleComponent /> </div> </template> <script> import SimpleComponent from './components/SimpleComponent' export default { name: 'App', components: { SimpleComponent } } </script>

Slide 62

Slide 62

“ Vue is the most compassionate framework in the market right now because it allows you to choose what's best for you.

Slide 63

Slide 63

BACK TO VUEPRESS

Slide 64

Slide 64

“ VuePress is a static site generator with a Vue-powered theming system that comes with a default theme optimized for technical documentation.

Slide 65

Slide 65

USE VUE IN MARKDOWN

Slide 66

Slide 66

USE VUE IN MARKDOWN 1. Interpolation

Slide 67

Slide 67

USE VUE IN MARKDOWN 1. Interpolation 2. Access Site and Page Data

Slide 68

Slide 68

USE VUE IN MARKDOWN 1. Interpolation 2. Access Site and Page Data 3. Directives

Slide 69

Slide 69

USE VUE IN MARKDOWN 1. Interpolation 2. Access Site and Page Data 3. Directives 4. Single File Components

Slide 70

Slide 70

HOW DO I GET STARTED? STARTED? https://vuepress.vuejs.org/ https://github.com/bencodezen /vuepress-starter-kit

Slide 71

Slide 71

Q&A

Slide 72

Slide 72

THANKS! @bencodezen