Skip to content
Cosmic JS documentation
Branch: master
Clone or download
Latest commit 6321a35 May 17, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs EDIT: logo update May 18, 2019
.gitignore gitignore May 7, 2019 Update May 9, 2019
package.json ADD: Google Analytics May 13, 2019
yarn.lock ADD: Google Analytics May 13, 2019

Cosmic JS Docs

📖 View Docs

This is the source code for the Cosmic JS documentation site and is built with VuePress v1+.

Local Setup

To setup the local environment:



This will create a local web server at http://localhost:8080/docs/ if nothing is running on that port. It has hot module reloading and will detect most changes you make.*

$ yarn run dev

* Note: It is not always reliable when making low level configurations or changing the underlying architecture of VuePress, but this should not impact most users who are focused on content and UI level changes.


This will compile the package you want for deploying to production. It will create a folder in docs/.vuepress/dist.

$ yarn build

Configure Sidebar Icons

In .vuepress/config.js, there is a sidebar option to configure the various top level sections.

To add icons:

  1. Add icon image asset (if font-icons are desired, more work is required) to the .vuepress/public directory which exposes the image for reference
  2. Open the .vuepress/config.js file and locate the themeConfig.sidebar array
  3. Add the icon key and the file path as the value:
module.exports = {
  themeConfig: {
    sidebar: [
        title: 'Home',
        path: '/',
        // Add icon uploaded to `.vuepress/public/icons/home.svg`
        icon: '/icons/home.svg'
You can’t perform that action at this time.