Skip to content

Contains the Astro build files needed for Chocolatey repositories.

License

Notifications You must be signed in to change notification settings

chocolatey/choco-astro

Chocolatey choco-astro

NOTE: This project is used on Chocolatey websites and is being released for the benefit of the community. While we endeavour to help and fix issues, it will be limited to GitHub issues, discussions and pull requests when we are able to.

This repository holds all Astro specific dependencies needed to run Astro on a Chocolatey project.

Installation

To install and use these Astro dependencies in a project, run the following command:

yarn add choco-astro

If you have used to the Astro CLI to install dependencies on a project, you will need to remove those dependencies in replace of this package.

Upgrading choco-astro

Before upgrading Astro dependencies, review the changelog to ensure there is nothing that will need to change in the repositories that use it. If changes are required, issues should be created to track and implement them with the upgrade of the choco-astro package. To upgrade the dependencies in this package that are managed by Astro, run the following command:

yarn dlx @astrojs/upgrade

Overriding Automatically Generated Heading ID's

Astro automatically generates ID's for <h1> - <h6>. Unfortunately, it generates invalid ID's when the heading starts with a number. To address this issue, choco-astro uses the remark-custom-header-id plugin. See the example below on how to use this plugin to override an ID:

## 0.12.1 (May 23, 2024) \{#may-23-2024}

Understanding Astro Components

The Chocolatey Design System has all information relating to Astro Components and how to use them:

Markdown Diagrams with Mermaid

Mermaid via an Astro integration allows an easy way to display information with diagrams written in markdown. A simple example of a flowChart diagram could be as follows:

    ```mermaid
      flowchart LR
        A ==> B
    ```

Additional Resources

Resource Purpose
astro.config.mjs Gives a baseline example of how to import and use the recommended integrations.
tsconfig.astro Give compiler options needed for usage of TypeScript in an Astro project.