Skip to content

Commit

Permalink
Merge pull request #4 from code0-tech/basic-preview-docs
Browse files Browse the repository at this point in the history
Add basic preview docs
  • Loading branch information
Taucher2003 authored Dec 26, 2023
2 parents eb99696 + 041fc11 commit 5641798
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/content/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,15 @@ description: Find out how the documentation page works
template: splash
---

import {CardGrid, Card} from "@astrojs/starlight/components";

Telescopium is the documentation page for Code0.

<CardGrid stagger>
<Card title='<a href="structure.md">Directory structure</a>' icon="document">
Learn about the directory structure requirements for projects containing documentation.
</Card>
<Card title='<a href="preview.md">Preview locally</a>' icon="open-book">
Learn how to preview documentation locally.
</Card>
</CardGrid>
21 changes: 21 additions & 0 deletions docs/content/preview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Previewing locally
---

The telescopium project can start a local preview for the documentation a project.

This is done with the `project:preview` script which calls `scripts/docs_preview.js`.

## Start local preview

Requirements:

- Dependencies of Telescopium are installed
- The other project is cloned in the same parent directory as telescopium
- The other project follows the [expected structure](structure.md)

Run `npm run project:preview <project-name>` where `<project-name>` is replaced with
the name of the directory which contains the project you want to preview.

The preview relies on symbolic links. If symbolic links are not supported by your platform,
you can't use the preview.
20 changes: 20 additions & 0 deletions docs/content/structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Directory Structure
---

The telescopium project sets some expectations on projects that use it as documentation page.

Requirements:

- `docs/starlight.json`
- `docs/content/`

## `docs/starlight.json`

This file contains the [starlight configuration](https://starlight.astro.build/reference/configuration/).

## `docs/content/`

This directory contains the actual documentation pages. It is configured as a content collection of
documentation type. It can contain `*.md` and `*.mdx` files. Every page needs a `title` set in the
front-matter configuration.

0 comments on commit 5641798

Please sign in to comment.