Skip to content

Latest commit

 

History

History
74 lines (45 loc) · 2.3 KB

readme.md

File metadata and controls

74 lines (45 loc) · 2.3 KB

ZEIT Documentation

This is the public documentation for ZEIT now all other related services.
You can access this documentation online at https://zeit.co/docs .

Running Locally

Download the copy of this repostory.

git clone https://github.com/zeit/docs.git

Then visit to the downloaded repository and install dependencies with:

npm install 

Then you can run the app with: (The app is written in Next.js)

npm run dev

Now the documentation is running at http://localhost:3000/docs.

Editing Docs Content

You can find the source of the documentation inside the pages/docs directory. Documentation is mostly written in markdown with the help of some React components.

Those components give us additional features which are not available in markdown.

Adding New Docs

Any document can be modified with markdown or any imported React component with the power of MDX.

The following is the format of any guide page, which is used when creating any new document when placing that document within the pages/docs directory. The page extension must be .md.

import withDoc from '../../../lib/with-doc'

import { TerminalInput } from '../../../components/text/terminal'

export const meta = {
  title: 'The Title for the New Guide',
  date: '23 June 2017',
  editUrl: 'pages/docs/category/file.md',
}

This is the content written in Markdown.

<TerminalInput># this is how we show the terminal input</TerminalInput>  

The following is to allow the content to be exported as a page with our layout

export default ({children}) => <Doc meta={meta}>{ children }</Doc>

Then you can add it to the sidebar by editing the file located at: lib/data/docs.js.

Adding Images and Assets

You can add images and assets into the static directory. Always try to avoid using hosted images. If you are creating a new docs page, keep you images inside a subdirectory under static/docs.

New Components

Always try to use the existing components and features in markdown. Create a new component or use a component from NPM, unless there is no other option.

Submiting Changes / New Doc Pages

We are happy to recieve any pull requests with changes that could make our documentation better and easier to understand.