forked from drowl87/hextra_mirror
chore: add contributing guide
[skip ci]
This commit is contained in:
parent
6d00cb32b0
commit
61e41f247b
110
.github/CONTRIBUTING.md
vendored
Normal file
110
.github/CONTRIBUTING.md
vendored
Normal file
@ -0,0 +1,110 @@
|
||||
# Contribute to Hextra
|
||||
|
||||
👋 Thank you for being interested in contributing to Hextra! As an open source project, we welcome contributions of many forms including bug reports, feature requests, documentation improvements, and code contributions.
|
||||
|
||||
<!-- omit in toc -->
|
||||
## Table of Contents
|
||||
|
||||
- [Guidelines](#guidelines)
|
||||
- [Contributing Code](#contributing-code)
|
||||
- [Contributing Documentation](#contributing-documentation)
|
||||
- [💬 GitHub Discussions](#-github-discussions)
|
||||
- [GitHub Issues](#github-issues)
|
||||
- [Development](#development)
|
||||
- [Local development setup](#local-development-setup)
|
||||
- [Project structure](#project-structure)
|
||||
- [Start the development server](#start-the-development-server)
|
||||
- [Compile the styles](#compile-the-styles)
|
||||
|
||||
|
||||
## Guidelines
|
||||
|
||||
### Contributing Code
|
||||
|
||||
To contribute, please follow the ["Fork and Pull Request"][fork and pull] workflow:
|
||||
|
||||
Fork the repository, make your changes, and then submit a pull request.
|
||||
Please make sure to include a description of the changes you made and why you made them.
|
||||
Use [Conventional Commits][conventional commits] message to make it easier to understand the changes you made.
|
||||
|
||||
### Contributing Documentation
|
||||
|
||||
Similar to contributing code, you can also contribute to the documentation by submitting a pull request.
|
||||
|
||||
The documentation site is located in the [`exampleSite`](../exampleSite/) folder.
|
||||
You can make changes to the documentation and create a pull request. A preview of the new documentation will be automatically generated and displayed in the pull request comment via [Netlify][netlify deploy preview].
|
||||
|
||||
### 💬 GitHub Discussions
|
||||
|
||||
We’re using [Discussions][discussions] as a place to connect with other members using Hextra:
|
||||
|
||||
- Ask questions you’re wondering about.
|
||||
- Share ideas.
|
||||
- Engage with other users.
|
||||
|
||||
### GitHub Issues
|
||||
|
||||
If you find a bug or have a feature request, please [open an issue][issues].
|
||||
|
||||
Please make sure to include a description of the bug or feature you are requesting. If you are reporting a bug, please include steps to reproduce the bug.
|
||||
|
||||
We recommend that you search existing [issues][issues] or discussions before opening a new one to prevent duplicates.
|
||||
|
||||
## Development
|
||||
|
||||
> **Note**
|
||||
> You can start developing on [GitHub Codespaces][open in codespaces] or use [devcontainer][devcontainer] locally without installing any dependencies.
|
||||
|
||||
### Local development setup
|
||||
|
||||
- [Hugo][hugo] >= v0.115.0 (extended version)
|
||||
- [Node.js][nodejs]
|
||||
- [Go][go]
|
||||
|
||||
Install dependencies:
|
||||
|
||||
```bash
|
||||
npm i
|
||||
```
|
||||
|
||||
### Project structure
|
||||
|
||||
- [`assets`](../assets/): CSS styles and JavaScript files.
|
||||
- [`data`](../data/): The theme data files. Now only contains the `icons.yaml` file.
|
||||
- [`exampleSite`](../exampleSite/): The documentation site for the theme.
|
||||
- [`i18n`](../i18n/): The theme translation files.
|
||||
- [`layouts`](../layouts/): The theme layouts.
|
||||
- [`static`](../static/): The static files for the theme. For example, the favicon and the site logo.
|
||||
|
||||
Please refer to the [Hugo documentation][hugo] for more information.
|
||||
|
||||
### Start the development server
|
||||
|
||||
```bash
|
||||
npm run dev:theme
|
||||
```
|
||||
|
||||
It will start the Hugo server on `http://localhost:1313/` for the `exampleSite` content.
|
||||
|
||||
### Compile the styles
|
||||
|
||||
For development preview, we compile the Tailwind CSS styles on the fly. But for production, we need to compile the styles first.
|
||||
|
||||
```bash
|
||||
npm run build:css
|
||||
```
|
||||
|
||||
It will compile the Tailwind CSS styles and generate the `assets/css/compiled/main.css` file.
|
||||
|
||||
<!--links-->
|
||||
|
||||
[fork and pull]: https://docs.github.com/en/get-started/quickstart/contributing-to-projects
|
||||
[conventional commits]: https://www.conventionalcommits.org
|
||||
[issues]: https://github.com/imfing/hextra/issues
|
||||
[discussions]: https://github.com/imfing/hextra/discussions
|
||||
[nodejs]: https://nodejs.org/en/
|
||||
[hugo]: https://gohugo.io/
|
||||
[go]: https://golang.org/doc/install
|
||||
[devcontainer]: https://code.visualstudio.com/docs/devcontainers/containers
|
||||
[open in codespaces]: https://codespaces.new/imfing/hextra
|
||||
[netlify deploy preview]: https://docs.netlify.com/site-deploys/deploy-previews/
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -1,4 +1,5 @@
|
||||
{
|
||||
"editor.tabSize": 2,
|
||||
"css.customData": [".vscode/tailwind.json"]
|
||||
"css.customData": [".vscode/tailwind.json"],
|
||||
"markdown.extension.toc.levels": "2..6"
|
||||
}
|
||||
|
@ -31,13 +31,16 @@ Using the [Hextra Starter Template](https://github.com/imfing/hextra-starter-tem
|
||||
|
||||
The template repository also includes a [GitHub Actions workflow](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow) for deploying your website to GitHub Pages.
|
||||
|
||||
<img alt="Hextra Starter Template" src="https://user-images.githubusercontent.com/5097752/263551418-c403b9a9-a76c-47a6-8466-513d772ef0b7.jpg" width=600/>
|
||||
|
||||
### Usage
|
||||
|
||||
Refer to the [documentation](https://imfing.github.io/hextra/docs) for more information.
|
||||
|
||||
## Contributing
|
||||
|
||||
This project is actively under development. Contributions are welcome!
|
||||
Contributions are welcome!
|
||||
Check out the [contributing guide](.github/CONTRIBUTING.md) to get started.
|
||||
|
||||
## License
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user