Skip to content

Commit

Permalink
refactor: use yaml config
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 23, 2024
1 parent c5f473b commit 038198a
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 24 deletions.
24 changes: 0 additions & 24 deletions docs/.config/docs.jsonc

This file was deleted.

25 changes: 25 additions & 0 deletions docs/.config/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# yaml-language-server: $schema=https://unpkg.com/undocs/schema/config.json

name: 'UnDocs'
shortDescription: 'Docs, made easy.'
description: 'Elegant documentation tooling for UnJS ecosystem.'
github: 'unjs/docs'
url: 'https://undocs.pages.dev'
redirects:
'/docs': '/docs/getting-started'
'/old': '/docs'
automd: true
landing:
heroLinks:
stackblitz:
icon: 'i-heroicons-play'
to: 'https://stackblitz.com/github/unjs/docs/tree/main/template'
contributors: true
# featuresLayout: 'hero'
features:
- title: 'Eazy to use'
description: 'Focus on writing your *documentation* with Markdown, not tooling.'
- title: 'Nuxt powered'
description: 'Made with [Nuxt](https://nuxt.com), Nuxt Content, Nuxt SEO and Nuxt UI Pro.'
- title: 'Deploy anywhere'
- description: 'The documentation can be hosted on any static hosting.'
4 changes: 4 additions & 0 deletions docs/1.guide/1.index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
icon: ph:book-open-duotone
---

# Getting Started

> [!IMPORTANT]
Expand Down
4 changes: 4 additions & 0 deletions docs/1.guide/components.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
icon: bxs:component
---

# Components

> Discover the components you can use in your markdown files.
Expand Down
35 changes: 35 additions & 0 deletions docs/2.config/1.index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
---
icon: ri:settings-3-line
---

# Configuration

## Example

```yaml
# <!-- TODO: automd file generator should support code block wrapper! PR welcome ;) -->
<!-- automd:file src="../../template/.config/docs.yaml" -->

# yaml-language-server: $schema=https://unpkg.com/undocs/schema/config.json

name: 'packageName'
shortDescription: ''
description: ''
github: 'unjs/packageName'
# url: 'https://packageName.unjs.io'
# redirects:
# "/from": "/to"
# automd: true
landing:
heroLinks:
stackblitz:
icon: 'i-heroicons-play'
to: 'https://stackblitz.com/github/unjs/packageName/tree/main/playground'
# contributors: true
# features:
# - title:
# description:

<!-- /automd -->
```

## Reference

<!-- automd:jsdocs src="../../schema/config.schema.ts" -->

### `$schema`
Expand Down
19 changes: 19 additions & 0 deletions template/.config/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# yaml-language-server: $schema=https://unpkg.com/undocs/schema/config.json

name: 'packageName'
shortDescription: ''
description: ''
github: 'unjs/packageName'
# url: 'https://packageName.unjs.io'
# redirects:
# "/from": "/to"
# automd: true
landing:
heroLinks:
stackblitz:
icon: 'i-heroicons-play'
to: 'https://stackblitz.com/github/unjs/packageName/tree/main/playground'
# contributors: true
# features:
# - title:
# description:

0 comments on commit 038198a

Please sign in to comment.