How to Contribute
Want to help out with the wiki? Contributions are always welcome! You can contribute by adding new guides, improving existing ones, or even just fixing typos.
Project Structure
Section titled “Project Structure”This project uses Starlight framework which convert the content written in markdown files to webpages.
These are some of the important files and folders in the project:
Directorypublic/ # Static assets like images and icons
- …
Directorysrc/
Directoryassets/
Directoryimages/ # Images used in the guides
- …
Directorycontent/
Directorydocs/ # The markdown files for the guides and documentation
- …
- astro.config.mjs # General configuration, including sidebar structure
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.
For example, src/content/docs/guides/how-to-contribute.mdx is available at the route /guides/how-to-contribute.
Making changes
Section titled “Making changes”To make changes to the project, you either do it from your browser using the GitHub Web UI, or you can clone the project and run it locally.
The GitHub Web UI is useful for making small changes, like fixing typos or adding a small section to an existing guide, while running the project locally is useful for making larger changes that require testing, or for adding new guides with images.
To run the project locally, you need to have Node.js, Git and Visual Studio Code installed on your computer.
It is recommended to install the Astro extension for Visual Studio Code for a better development experience.
With those installed, you can clone the repository and run the project locally by following these steps:
-
Open your terminal and navigate to the directory where you want to clone the repository
You can simplyShift + Right-Clickin the desired folder and selectOpen in Terminal. -
Clone the repository:
Terminal window git clone https://github.com/acnhmodding/acnhmodding.github.io.git -
Navigate to the project directory:
Terminal window cd acnhmodding.github.io -
Install the dependencies:
Terminal window npm install -
Start the development server:
Terminal window npm run dev -
Navigate to http://localhost:4321/ and you should be able to see the website.
If you did everything correctly, you should see the website running locally, and any changes you make to the markdown files in src/content/docs/ should be reflected in the website in real-time.
Each page has an Edit page button at the very bottom of the page, which will take you to the GitHub web UI where you can edit the associated markdown file.
Adding images to your guide
Section titled “Adding images to your guide”If you want to add images to your guide, install the Markdown Image extension (should appear on the recommended extensions) and simply use Alt + Shift + V to insert an image.
The extension is pre-configured and it will prompt you for the file name and description, and automatically store the image in src/assets/images/ and insert the correct markdown syntax for the image in your guide.
Adding new content
Section titled “Adding new content”To add content it is recommended to run the project locally, and create a new markdown file (.mdx) in src/content/docs/ with the content you want to add. You can use existing guides as a reference for how to structure your guide.
If you want to add a new category to the sidebar, you can create a new folder in src/content/docs/ and edit the astro.config.mjs file to include the new category in the sidebar structure.
Learn more about Starlight
Section titled “Learn more about Starlight”Check out Starlight’s docs to learn more about everything you can do with Starlight, including default components and styling.
Our contributors
Section titled “Our contributors”These are the people who have contributed to the project, whether by adding new guides, improving existing ones, or even just fixing typos.