Getting Started
Prerequisites
* If your project is using webpack 3.x, you may notice some installation issues with npm. In this case, we recommend using Yarn.
Quick Start
The fastest way to get your KduPress project setup is to use our create-kdupress-site generator (opens new window) which will help scaffold the basic KduPress site structure for you.
To use it, open up your terminal in the desired directory and run the following command:
yarn create kdupress-site [optionalDirectoryName]
npx create-kdupress-site [optionalDirectoryName]
// Make sure to add code blocks to your code group
You will then have the opportunity to configure your KduPress site’s metadata such as:
- Project Name
- Description
- Maintainer Email
- Maintainer Name
- Repository URL
Once it is complete, you should see your new KduPress site scaffolded in your directory! 🎉
Manual Installation
This section will help you build a basic KduPress documentation site from ground up. If you already have an existing project and would like to keep documentation inside the project, start from Step 3.
Create and change into a new directory
mkdir kdupress-starter && cd kdupress-starter
Initialize with your preferred package manager
yarn init
npm init
// Make sure to add code blocks to your code group
Install KduPress locally
yarn add -D kdupress
npm install -D kdupress
// Make sure to add code blocks to your code group
Create your first document
mkdir docs && echo '# Hello KduPress' > docs/README.md
Add some scripts (opens new window) to
package.json
This step is optional but highly recommended, the rest of the documentation will assume those scripts being added.
{ "scripts": { "docs:dev": "kdupress dev docs", "docs:build": "kdupress build docs" } }
Serve the documentation site in the local server
yarn docs:dev
npm run docs:dev
// Make sure to add code blocks to your code group
KduPress will start a hot-reloading development server at http://localhost:8080 (opens new window).
By now, you should have a basic but functional KduPress documentation site. Next, learn about KduPress’ recommended directory structure and the basics of configuration in KduPress.
Once you’re familiar with those concepts mentioned above, learn how to enrich your content with static assets, Markdown extensions and kdu components.
And when your documentation site starts to take shape, be sure to read about multi-language support and the deployment guide.