Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: finalize readme for new astro setup #51

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,31 @@
**Version 2.0.0 : [Changelog](./CHANGELOG.md)** <!-- x-release-please-version -->

> This repo is a template repository to create your own progress report in Markdown.
> The Markdown will be compiled into a static website using [VitePress](https://vitepress.vuejs.org/).
> Creating a progress report is a requirement for the CFC of computer scientist applications development in Switzerland.
> The Markdown will be compiled into a static website using [Astro stralight template](https://github.com/withastro/starlight).
> Creating a progress report is a **requirement** for the CFC of computer scientist applications development in Switzerland.

## How to use

1. Create a new repository using this template repository (click on the green button "Use this template").
2. Clone your new repository on your machine.
3. Edit your base information :
- In `src/.vitpress/config.mts` :
- Change the `base` property to your repository name (if you have set a custom repository name).
- Change the `title` property with your name or pseudo.
- Change the `socialLinks`property with your GitHub repository link.
- Change the `editLink` with your repository name.
- In `src/index.md` :
- Change the `name` property with your name or pseudo.
3. In the `astro.config.mjs` file, edit all lines with a `TODO` comment to your corresponding information.
4. Install dependencies and run the dev server :
```bash
npm install
npm run dev
pnpm install
pnpm dev
```
5. Then you can make more changes to the Markdown content and see the result in your browser. Don’t forget to check [vitepress Markdown docs](https://vitepress.dev/guide/markdown).
5. Then you can make more changes to the Markdown content and see the result in your browser. Don’t forget to check [Starlight md docs](https://starlight.astro.build/guides/authoring-content/).

## How to add content

Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.

Images can be added to `src/assets/` and embedded in Markdown with a relative link.
Images can be added to `src/assets/` and embedded in Markdown with a **relative link**.

Static assets, like favicons, can be placed in the `public/` directory.

Static assets and links to pages must include the site base path to work. Astro builder does not automatically inclute it.

## Commands

All commands are run from the root of the project, from a terminal:
Expand Down