VuePress: Creating Beautiful Docs You Will Want to Maintain

A presentation at Vue Philly - August Edition in August 2019 in by Ben Hong

Slide 1

Slide 1

VUEPRESS CREATING BEAUTIFUL DOCS YOU WILL WANT TO MAINTAIN Ben Hong @bencodezen Wednesday, August 21st, 2019

Slide 2

Slide 2

BEN HONG

Slide 3

Slide 3

Slide 4

Slide 4

BEN HONG

Slide 5

Slide 5

BEN HONG Senior Frontend Engineer @ Meltano in GitLab @bencodezen

Slide 6

Slide 6

VueDC https://www.vuedc.io BEN HONG Senior Frontend Engineer @ Meltano in GitLab @bencodezen Vue.js Events https://events.vuejs.org

Slide 7

Slide 7

BEFORE WE GET STARTED… SLIDES WILL BE AVAILABLE ONLINE https://www.twitter.com/bencodezen FOR THE SOCIAL MEDIA FOLKS @bencodezen - #VuePress

Slide 8

Slide 8

Slide 9

Slide 9

(╯°□°)╯︵ ┻━┻)

Slide 10

Slide 10

Slide 11

Slide 11

Slide 12

Slide 12

Yeah. I’m gonna need you to document that in Confluence…

Slide 13

Slide 13

THE PROBLEM WITH CONFLUENCE 1. Behind a paywall

Slide 14

Slide 14

THE PROBLEM WITH CONFLUENCE 1. Behind a paywall 2. Separate from your code

Slide 15

Slide 15

THE PROBLEM WITH CONFLUENCE 1. Behind a paywall 2. Separate from your code 3. Difficult to customize

Slide 16

Slide 16

THE PROBLEM WITH CONFLUENCE 1. Behind a paywall 2. Separate from your code 3. Difficult to customize

Slide 17

Slide 17

So tell me more about this VuePress thing…

Slide 18

Slide 18

Slide 19

Slide 19

Slide 20

Slide 20

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

IT’S OPEN SOURCE SO IT’S 100% FREE

Slide 23

Slide 23

IT LIVES SIDE BY SIDE WITH YOUR CODE

Slide 24

Slide 24

Slide 25

Slide 25

OPTIMIZED FOR YOUR WRITING EXPERIENCE

Slide 26

Slide 26

COOL MARKDOWN EXTENSIONS: YAML FRONT MATTER README.md http://localhost:8080/ —title: Write Docs Like a Pro lang: en-US ——Writing docs can be hard, but with VuePress it’s so much more fun! Writing docs can be hard, but with VuePress it’s so much more fun!

Slide 27

Slide 27

COOL MARKDOWN EXTENSIONS: YAML FRONT MATTER README.md ——{ “title”: “Write Docs Like a Pro”, “lang”: “en-US” } ——Writing docs can be hard, but with VuePress it’s so much more fun! http://localhost:8080/ Writing docs can be hard, but with VuePress it’s so much more fun!

Slide 28

Slide 28

COOL MARKDOWN EXTENSIONS: EMOJIS README.md http://localhost:8080/ :fire: :fire: :fire: :fire: :fire: :fire: :fire: :fire: :fire: :fire: :fire: :fire: :fire: :fire: :fire: :fire: :cat: Everything is fine… 🔥🔥🔥🔥🔥🔥🔥🔥 :fire: :fire: :fire: :fire: :fire: :fire: :fire: :fire: 🔥🔥🔥🔥🔥🔥🔥🔥 :fire: :fire: :fire: :fire: :fire: :fire: :fire: :fire: 🐱 Everything is fine… 🔥🔥🔥🔥🔥🔥🔥🔥 🔥🔥🔥🔥🔥🔥🔥🔥

Slide 29

Slide 29

COOL MARKDOWN EXTENSIONS: SYNTAX HIGHLIGHTING README.md js export default { data () { return { msg: 'Highlighted!' } } }

Slide 30

Slide 30

README.md js export default { data () { return { msg: 'Highlighted!' } } }

Slide 31

Slide 31

http://localhost:8080/

Slide 32

Slide 32

README.md js{4} export default { data () { return { msg: 'Highlighted!' } } }

Slide 33

Slide 33

http://localhost:8080/

Slide 34

Slide 34

COOL MARKDOWN EXTENSIONS: CUSTOM CONTAINERS README.md http://localhost:8080/ ::: tip This is a tip ::: ::: warning This is a warning ::: ::: danger This is a dangerous warning :::

Slide 35

Slide 35

README.md ::: tip This is a tip ::: ::: warning This is a warning ::: ::: danger This is a dangerous warning :::

Slide 36

Slide 36

http://localhost:8080/

Slide 37

Slide 37

COOL MARKDOWN EXTENSIONS: CUSTOM CONTAINERS README.md http://localhost:8080/ ::: tip This is a tip ::: ::: warning This is a warning ::: ::: danger This is a dangerous warning :::

Slide 38

Slide 38

README.md ::: tip Bringing it all together! We can write normal text and even include other extensions in this! js{5} const list = [1, 2, 3] list.map(item => { // This is so cool console.log(item ** 2) }) :rocket: :rocket: :rocket: :::

Slide 39

Slide 39

http://localhost:8080/

Slide 40

Slide 40

IT COMES WITH A DEFAULT THEME THAT IS…

Slide 41

Slide 41

VuePress Official Docs: https://vuepress.vuejs.org/

Slide 42

Slide 42

IT COMES WITH A DEFAULT THEME THAT IS 🔥 Responsive theme with essential navigation features built out Automatic Last Updated meta field Internationalization ready when you need it Easily customizable Built in searching / autocomplete Automatic link generation to repo

Slide 43

Slide 43

Slide 44

Slide 44

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

Slide 45

Slide 45

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

Slide 46

Slide 46

VUE MAGIC: INTERPOLATION README.md # VuePress in Toronto http://localhost:8080/ {{ “Happy Friday!”.toUpperCase() }} VuePress in Toronto :wave: :wave: :wave: :wave: :wave: :wave: HAPPY FRIDAY! So glad to be here at VueConf Toronto with over {{ 200 + 200 }} people! 👋👋👋👋👋👋 Things I need to try: 1. Tim Horton’s 1. Poutine 1. All the maple flavored things! :maple: So glad to be here at VueConf Toronto with with over 400 people! Things I need to try: 1. Tim Horton’s 2. Poutine 3. All the maple flavored things! 🍁

Slide 47

Slide 47

README.md

VuePress in Toronto {{ “Happy Friday!”.toUpperCase() }} :wave: :wave: :wave: :wave: :wave: :wave: So glad to be here at VueConf Toronto with over {{ 200 + 200 }} people! Things I need to try: 1. Tim Horton’s 1. Poutine 1. All the maple flavored things! :maple:

Slide 48

Slide 48

README.md —city: Toronto —# VuePress in {{ $page.frontmatter.city }} {{ “Happy Friday!”.toUpperCase() }} :wave: :wave: :wave: :wave: :wave: :wave: So glad to be here at VueConf {{ $page.frontmatter.city }} with over {{ 200 + 200 }} people! Things I need to try: 1. Tim Horton’s 1. Poutine 1. All the maple flavored things! :maple:

Slide 49

Slide 49

Slide 50

Slide 50

Slide 51

Slide 51

YOU CAN USE VUE COMPONENTS IN YOUR MARKDOWN

Slide 52

Slide 52

Slide 53

Slide 53

http://localhost:8080/

Slide 54

Slide 54

Slide 55

Slide 55

Slide 56

Slide 56

HOW DO I GET STARTED? VuePress Official Docs: https://v1.vuepress.vuejs.org/ Ben’s VuePress Starter Kit https://github.com/bencodezen/vuepress-starter-kit

Slide 57

Slide 57

DOCUMENT ALL THE THINGS

Slide 58

Slide 58

THANKS EVERYONE! @BENCODEZEN