0.12.6 • Published 2 years ago

piral-docs-tools v0.12.6

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Build Status npm node GitHub tag GitHub issues

piral-docs-tools · GitHub license

The tools for making the documentation page of the Piral project. You can find it at docs.piral.io.

Installation

You can add the tool by installing it via NPM:

npm i piral-docs-tool --save-dev

A couple of peer dependencies also need to be resolved. If can install all peer dependencies using:

npm i piral-core piral-cli piral-cli-parcel react react-dom react-router-dom --save-dev

Configuration

Place a file called docs.config.json in the project folder where piral-docs is being run. It should be adjacent to the package.json.

{
  "title": "Doc Title",
  "description": "The description for the documentation.",
  "author": "your-orga",
  "branch": "main",
  "repositoryUrl": "https://github.com/your-orga/your-repo",
  "rootDir": ".",
  "outputDir": "./dist/docs",
  "changelogFile": "./CHANGELOG.md",
  "styles": [
    "./src/styles.css"
  ],
  "components": {
    "logo": "./src/Logo.tsx",
    "footer": "./src/Footer.tsx",
    "notFoundPage": "./src/NotFoundPage.tsx"
  },
  "pages": {
    "/imprint": "./src/ImprintPage.tsx"
  },
  "helpers": {
    "setup": "./src/setup.ts",
    "filter": "./src/filter.ts",
    "plugins": "./src/piralPlugins.ts",
    "requestPilets": "./src/requestPilets.ts"
  },
  "redirects": {
    "/": "/chapterName"
  },
  "sitemap": {
    "chapterName": {
      "title": "Chapter 1",
      "sections": []
    }
  }
}

Commands

Building

A documentation page can be built using

piral-docs build

Watching

A documentation page can be watched using

piral-docs watch

Emulator

An emulator package can be built using

piral-docs sdk

Sitemap Structure

The structure of a sitemap is as follows:

interface SingleSection {
  title: string;
  links: SitemapItem | Array<SitemapItem>;
}

type GenerateContent = CustomGenerator | StandardGenerator;

interface StandardGenerator {
  generator: 'markdown' | 'types';
  segment: string;
  dir: string;
  exclude?: string;
  include?: string;
}

interface CustomGenerator {
  generator: 'custom';
  path: string;
}

type SitemapItem = GenerateContent | SingleSection;

interface Sitemap {
  [chapterName: string]: {
    title: string;
    sections: Array<SitemapItem>;
  };
}

License

Thest tools are released using the MIT license. For more information see the license file.

0.13.0-pre.68

2 years ago

0.13.0-pre.69

2 years ago

0.13.0-pre.62

2 years ago

0.12.6-pre.59

2 years ago

0.13.0-pre.61

2 years ago

0.13.0-pre.66

2 years ago

0.13.0-pre.67

2 years ago

0.12.6

2 years ago

0.12.3-pre.55

3 years ago

0.12.1

3 years ago

0.12.2

3 years ago

0.12.3

3 years ago

0.12.4

2 years ago

0.12.5

2 years ago

0.12.0-pre.51

3 years ago

0.12.0

3 years ago

0.11.0

3 years ago

0.11.1

3 years ago

0.11.2

3 years ago

0.11.3

3 years ago

0.11.4

3 years ago

0.11.5

3 years ago

0.12.0-pre.50

3 years ago

0.11.2-pre.43

3 years ago

0.11.2-pre.42

3 years ago

0.10.1

3 years ago

0.10.0-pre.37

3 years ago

0.10.0

3 years ago

0.10.0-pre.36

3 years ago

0.10.0-pre.35

3 years ago

0.9.1-pre.33

3 years ago

0.9.1

3 years ago

0.9.1-pre.32

3 years ago

0.9.1-pre.31

3 years ago

0.9.1-pre.30

3 years ago

0.8.2-pre.25

3 years ago

0.8.1-pre.23

3 years ago

0.8.0-pre.21

3 years ago

0.8.0-pre.20

3 years ago

0.9.0-pre.27

3 years ago

0.9.0-pre.28

3 years ago

0.8.0-pre.19

3 years ago

0.9.0

3 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.7.1

3 years ago

0.6.2

3 years ago

0.5.3

3 years ago

0.8.2

3 years ago

0.5.0

3 years ago

0.4.1

3 years ago

0.7.0

3 years ago

0.6.1

3 years ago

0.5.2

3 years ago

0.6.0

3 years ago

0.5.1

3 years ago

0.4.0

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago