• 18-19 College Green, Dublin 2
  • 01 685 9088
  • info@cunninghamwebsolutions.com
  • cunninghamwebsolutions
    Cunningham Web Solutions
    • Home
    • About Us
    • Our Services
      • Web Design
      • Digital Marketing
      • SEO Services
      • E-commerce Websites
      • Website Redevelopment
      • Social Media Services
    • Digital Marketing
      • Adwords
      • Social Media Services
      • Email Marketing
      • Display Advertising
      • Remarketing
    • Portfolio
    • FAQ’s
    • Blog
    • Contact Us
    MENU CLOSE back  

    VuePress: Documentation Made Easy

    You are here:
    1. Home
    2. Web Design
    3. VuePress: Documentation Made Easy
    https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/5c5dd5ad-3bf5-438a-8b33-5951ac864773/00-directory.png

    VuePress: Documentation Made Easy

    VuePress: Documentation Made Easy

    Ben Hong

    2019-08-30T13:00:59+02:00
    2019-08-30T12:36:08+00:00

    When it comes to any project that requires any user interaction (e.g., end users, maintainers, etc.), there is one critical factor that makes the difference between success and failure: good documentation. This holds true regardless of how small or large your project is. After all, short of providing one-on-one support for your project, documentation is the first line of defense for users who are trying to solve a problem. And whether you like it or not, you will never hear from users who give up after being unable to solve their problem due to inadequate documentation.

    The Challenges Of Creating Good Documentation

    When it comes to writing good documentation, there are four recurring issues that teams often encounter:

  • Documentation is often out of date.
    While no documentation for a project can be a frustrating experience, it is arguably worse to have outdated documentation. After all, the purpose of having documentation is to provide users with an official body of knowledge that they can rely on. When it is out of date, users are wasting their time and ultimately losing trust in your product.

    The primary reason that documentation becomes outdated is that documentation maintenance is separate from code changes. Without investing significant time and energy, this can be difficult to solve because:

  • Documentation usually lives in a third-party service like Confluence or a Wiki,
  • Developers are typically more interested in writing code than documentation.
  • Users are unable to easily provide feedback.
    No matter how good you think your documentation is, it is ultimately meaningless without testing it with real users who can provide feedback. As mentioned earlier, a common bias when evaluating the effectiveness of things like documentation is failing to account for users who were unable to solve their problems and gave up. Since no team would ever be able to account for every scenario of how users might use your product, users must have an easy and reliable way to give feedback.
  • Documentation is often written for by power users for power users.
    The flaw with using standard tools like wikis or README files is that they often only cater to a specific set of users who often have a pre-existing knowledge of the library and/or technology stack. As a result, it is fairly simple for them to navigate the space and find what they need. However, new users lack this prior knowledge and thus often require a much more immersive experience to engage them.

    Examples of this include:

    • A well-designed website,
    • Search capability,
    • Guided side navigation,
    • Easily identifiable meta information (i.e., last updated date),
    • Immersive content that extends beyond a wall of text that is difficult to easily comprehend.
  • Poor infrastructure that makes documentation difficult to maintain.
    As if writing good documentation that users can understand is not difficult enough, the ease in which a developer can write and/or maintain documentation is critical to its long term viability. So, for every additional barrier that developers must deal with to write and/or maintain documentation, the more likely it is that it will ultimately fail. As a result, it is critical that the authoring experience and maintenance of any documentation be as seamless and engaging as possible.
  • If only there was a tool that could do all of these things for us…

    Enter VuePress

    When first hearing of VuePress, one might be tempted to guess that it is an amalgamation of Vue.js and WordPress. Instead, you should think of VuePress as:

    Vue.js + Printing Press

    Because when all is said and done, VuePress is a static site generator!

    Some of you might be thinking, “Wait. Another static site generator? What’s the big deal?”

    While there are a number of tools that are static site generators, VuePress stands out from amongst the pack for a single reason: its primary directive is to make it easier for developers to create and maintain great documentation for their projects.

    Why Is VuePress So Powerful For Creating Documentation?

    The answer is simple. It was designed with one goal in mind: to help developers create great documentation sites while maintaining a fun authoring experience. This means that it provides a framework for developers to:

    • Create beautiful documentation sites,
    • Come with pre-built features essential to all documentation sites,
    • Optimize the authoring experience to make it as simple as updating a Markdown file.

    VuePress Can Co-Exist With Your Existing Codebase

    This is one of the main reasons why I strongly recommend it. When it comes to maintaining documentation, one way to guarantee it will go out of date is to make it difficult for developers to update docs when writing code. If you make the authoring experience difficult by forcing developers to update things in two different places, this will cause a lot of friction and often results in documentation getting left to the wayside. This is commonly seen when developers have to maintain a third party tool like a wiki, in addition to the codebase itself.

    Because it is a static site generator, this means that it can live in the same exact repo as your code.

    https://cloud.netlifyusercontent.com/assets/344dbf88-fdf9-42bb-adb4-46f01eedd629/5c5dd5ad-3bf5-438a-8b33-5951ac864773/00-directory.png

    A sample application with VuePress docs existing next to a Vue CLI scaffolded app (Large preview)

    As you can see in this sample web app structure, your code would live in the src directory as normal, but you would simply have a docs directory to contain all of your documentation. This means you get the benefits of:

    • All documentation is now version controlled;
    • Pull requests can now contain both documentation and code changes;
    • Creating separate scripts for running local instances of your code and docs at the same time;
    • Utilize build pipelines to determine whether new documentation site deployments go in sync with code deployments or not.

    The Default Theme Comes With Standard Configuration

    Writing documentation is hard enough as it is, so VuePress offloads a lot of the decisions that one normally has to make and has a bunch of built-in defaults to make your authoring experience easy:

    • Writing content is done primarily with Markdown.
      This means that you can leverage your existing knowledge of Markdown syntax to style and format your text.

    An example of how the Markdown is rendered in VuePress

    An example of how the Markdown is rendered in VuePress (Large preview)

    • Code syntax highlighting.
      If you were building a site all on your own, you would need to wrestle with color syntax highlighting libraries. But you’re in luck because you can add code blocks in VuePress is so easy since everything is ready to go with zero configuration.

    An example of how code block samples render in VuePress

    An example of how code block samples render in VuePress (Large preview)

    • Front matter for defining page-level meta data.
      Even though you’re authoring in a Markdown file, you can use front matter (like YAML, JSON, or TOML) to define metadata for your page to make it even easier to manage your content!
    ---
    title: Document Like a Pro
    lang: en-US
    description: Advice for best practices
    tags:
      - documentation
      - best practices
    ---
    
    • Custom Markdown containers.
      In case you didn’t know, Markdown has extensions to add even more useful shortcuts to create beautiful UI components like custom containers. And since they are so useful in documentation, VuePress has already configured it so you can use it right out of the box:

    A demonstration of custom containers rendered in VuePress

    A demonstration of custom containers rendered in VuePress (Large preview)

    Built-In Search Functionality

    Let’s face it. No matter how much time we spend writing great documentation, it will ultimately amount to being useless if the users can’t find it. There are generally two approaches to this:

  • Wait for search engine robots to slowly crawl your site in hopes that one day your users will be able to find the right page on your site. Not a great solution.
  • Build your own search functionality, but this can be difficult to implement for static sites as there’s no server-side code running to create search indexes and perform the lookups. Not to mention this is taking development time away from the product itself. So this isn’t great either.
  • Luckily for us, VuePress is here to save the day once again!

    VuePress comes with a built-in search functionality that generates its own “search engine” — you read that right. Without any additional database setup or configuration, VuePress is setup to scrape your entire docs to generate a simple search engine that will surface all of your h1s and h2s to your user.

    An example of basic searching in VuePress’ default theme (Large preview)

    Now, some of you may be thinking,

    “What if I want something that will provide lower-level indexing for searching?”

    Well, VuePress has got you covered there too because it is designed to easily integrate with Algolia DocSearch which can provide that functionality to you for free if you meet their requirements:

    An example of Algolia DocSearch in action

    An example of Algolia DocSearch in action (Large preview)

    Sidebar Navigation Is As Simple As Toggling The Feature On Or Off

    For anyone who has ever been responsible for managing content, you know how complicated it can be to built a sidebar that has nested items and then track what position the reader is on while scrolling down. So, why spend the time on that when you could be writing better docs? With VuePress, the sidebar is as simple as toggling on the front matter for a page:

    A demo of how the sidebar can be automatically generated through headings (Large preview)

    Automatic Generation Of Important Meta-Data That’s Commonly Overlooked

    One of the most frustrating things that a user can encounter is out-of-date documentation. When a user follows the steps and has trouble understanding why something doesn’t work, being able to easily find out the last updated date can be incredibly useful to both the user and maintainers of the project.

    With a simple configuration, VuePress can ensure automatically output the last updated date on the page so your users always know the last time it was updated.

    A screenshot to show the ‘Last Updated' metadata fieldA screenshot to show the ‘Last Updated’ metadata field (Large preview)

    On top of that, with a little bit of configuration, VuePress also makes it incredibly easy for users to contribute to your docs by automatically generating a link at the bottom of every single page that allows users to easily create a pull request to your docs.

    A demo of an automatically generated ‘Edit' link which allows users to easily submit PRs to the docsA demo of an automatically generated ‘Edit’ link which allows users to easily submit PRs to the docs (Large preview)

    It doesn’t get much easier than that for your users.

    Deployment On Any Static Hosting Site

    Since VuePress is a static site generator at its core, this means that you can deploy it on any popular hosting platform such as:

    • Netlify
    • GitHub Pages
    • GitLab Pages
    • Heroku
    • Now

    All you need to do to build the site is run vuepress build {{ docsDir }} with where your directory lives and you’ll have everything you need to deploy it live on the web!

    Note: For more in-depth guides on how to do this, check out the official deployment guides for VuePress.

    Leveraging Vue Inside Your Markdown File

    I know, I know. We can use Vue.js in our Markdown?! Yes, you read that right! While technically optional, this is probably one of the most exciting aspects of VuePress because it allows you to enhance your Markdown content like you’ve never been able to do before.

    Define Repetitive Data In One Place And Have It Update Everywhere With Interpolation

    In the example below, you’ll see a brief example of how you can leverage local variables (like the ones define in the frontmatter) as well as globally defined ones (like the site title):

    ---
    title: My Page Title
    author: Ben Hong
    ---
    
    # {{ $page.title }}
    
    Welcome to {{ $site.title }}! My name is {{ $page.author }} and I'll be your guide for today!
    

    Use Vue Components Within Markdown

    I’ll give you a moment to collect yourself after reading this, but yes, live Vue components with a full Vue instance can be yours for the taking if you want! It will take a little bit more work to configure, but this is to be expected since you are creating custom content that will be running in your documentation.

    Here is a quick example of what a Counter component would look like in a Markdown file:

    A demo of using Vue Components within MarkdownA demo of using Vue Components within Markdown (Large preview)

    This is perhaps the most powerful part of customization available to documentation since it means you now have the freedom to create custom content extends far beyond the abilities of standard Markdown. So whether it’s providing a demo, or some interactive code, the ideas are endless!

    Next Steps

    If you want to set up a beautiful documentation site for your users to learn how to use your product, it doesn’t get much easier than VuePress. And even though it might be easy to assume that VuePress should only be used by projects that use Vue.js, this could not be further from the truth. Here are just some examples of the different types of projects leveraging VuePress for their documentation sites:

    • Craft CMS
    • UmiJS (which is built for React)
    • openHAB
    • Peacock

    At the end of the day, regardless of whether you use VuePress or not, I hope this has helped to inspire you to create better documentation for your users.

    Further Resources

    There are many cool things that I did not cover here in this article (e.g. theming, blogging, and so on), but if you would like to learn more, check out these resources:

    • Official VuePress Docs
    • A Curated List of VuePress Related Resources
    • VuePress Gallery
    • VuePress Blog Boilerplate

    Smashing Editorial
    (dm, yk, il)

    From our sponsors: VuePress: Documentation Made Easy

    Posted on 30th August 2019Web Design
    FacebookshareTwittertweetGoogle+share

    Related posts

    Archived
    22nd March 2023
    Archived
    18th March 2023
    Archived
    20th January 2023
    Thumbnail for 25788
    Handling Continuous Integration And Delivery With GitHub Actions
    19th October 2020
    Thumbnail for 25778
    A Monthly Update With New Guides And Community Resources
    19th October 2020
    Thumbnail for 25781
    Supercharge Testing React Applications With Wallaby.js
    19th October 2020
    Latest News
    • Archived
      22nd March 2023
    • Archived
      18th March 2023
    • Archived
      20th January 2023
    • 20201019 ML Brief
      19th October 2020
    • Thumbnail for 25788
      Handling Continuous Integration And Delivery With GitHub Actions
      19th October 2020
    • Thumbnail for 25786
      The Future of CX with Larry Ellison
      19th October 2020
    News Categories
    • Digital Marketing
    • Web Design

    Our services

    Website Design
    Website Design

    A website is an important part of any business. Professional website development is an essential element of a successful online business.

    We provide website design services for every type of website imaginable. We supply brochure websites, E-commerce websites, bespoke website design, custom website development and a range of website applications. We love developing websites, come and talk to us about your project and we will tailor make a solution to match your requirements.

    You can contact us by phone, email or send us a request through our online form and we can give you a call back.

    More Information

    Digital Marketing
    Digital Marketing

    Our digital marketeers have years of experience in developing and excuting digital marketing strategies. We can help you promote your business online with the most effective methods to achieve the greatest return for your marketing budget. We offer a full service with includes the following:

    1. Social Media Marketing

    2. Email & Newsletter Advertising

    3. PPC - Pay Per Click

    4. A range of other methods are available

    More Information

    SEO
    SEO Services

    SEO is an essential part of owning an online property. The higher up the search engines that your website appears, the more visitors you will have and therefore the greater the potential for more business and increased profits.

    We offer a range of SEO services and packages. Our packages are very popular due to the expanse of on-page and off-page SEO services that they cover. Contact us to discuss your website and the SEO services that would best suit to increase your websites ranking.

    More Information

    E-commerce
    E-commerce Websites

    E-commerce is a rapidly growing area with sales online increasing year on year. A professional E-commerce store online is essential to increase sales and is a reflection of your business to potential customers. We provide professional E-commerce websites custom built to meet our clients requirements.

    Starting to sell online can be a daunting task and we are here to make that journey as smooth as possible. When you work with Cunningham Web Solutions on your E-commerce website, you will benefit from the experience of our team and every detail from the website design to stock management is carefully planned and designed with you in mind.

    More Information

    Social Media Services
    Social Media Services

    Social Media is becoming an increasingly effective method of marketing online. The opportunities that social media marketing can offer are endless and when managed correctly can bring great benefits to every business.

    Social Media Marketing is a low cost form of advertising that continues to bring a very good ROI for our clients. In conjuction with excellent website development and SEO, social media marketing should be an essential part of every digital marketing strategy.

    We offer Social Media Management packages and we also offer Social Media Training to individuals and to companies. Contact us to find out more.

    More Information

    Cunningham Web Solutions
    © Copyright 2025 | Cunningham Web Solutions
    • Home
    • Our Services
    • FAQ's
    • Account Services
    • Privacy Policy
    • Contact Us