|
1 | | -# Website |
| 1 | +# Open Cluster Management Website |
2 | 2 |
|
3 | | -This repo hosts the website code of open-cluster-management project. The docs website is hosted at https://www.netlify.com/. |
| 3 | +This repository contains the source code for the [Open Cluster Management](https://open-cluster-management.io/) project website. The website provides documentation, community resources, and information about the Open Cluster Management project. |
4 | 4 |
|
5 | | -The open-cluster-management website is based on the [Hugo framework](https://github.com/gohugoio/hugo), with the [Docsy](https://www.docsy.dev/) applied, and is written in Markdown format. |
| 5 | +## About This Repository |
6 | 6 |
|
7 | | -You can always click the Edit this page link at the top right of each page, but if you want to test your changes locally before submitting you can: |
| 7 | +This website is built using the [Hugo](https://gohugo.io/) static site generator with the [Docsy](https://www.docsy.dev/) theme. All content is written in Markdown format and organized in the `content/` directory. |
8 | 8 |
|
9 | | -Fork the open-cluster-management-io/open-cluster-management-io.github.io on GitHub. |
| 9 | +The live website is automatically deployed to [open-cluster-management.io](https://open-cluster-management.io/) via Netlify when changes are merged to the main branch. |
10 | 10 |
|
11 | | -Check out your copy locally: |
| 11 | +## Contributing to the Website |
12 | 12 |
|
13 | | -``` |
14 | | -git clone ssh://[email protected]/<your-user>/open-cluster-management-io.github.io.git |
15 | | -cd open-cluster-management-io.github.io |
16 | | -hugo server |
17 | | -``` |
| 13 | +### Quick Edits |
18 | 14 |
|
19 | | -An instance of the website is now running locally on your machine and is accessible at http://localhost:1313. |
| 15 | +For small changes, you can use the "Edit this page" link at the top right of any page on the website to make edits directly through GitHub's web interface. |
20 | 16 |
|
21 | | -Edit files in src. The browser should automatically reload so you can view your changes. |
| 17 | +### Local Development |
22 | 18 |
|
23 | | -When you are done with your edit(s) then commit, push, and submit a pull-request for your changes. |
| 19 | +For larger changes or when you want to preview your edits locally: |
24 | 20 |
|
25 | | -Your changes will be verified by CI. Check the job results for details of any errors. |
| 21 | +1. Fork this repository on GitHub |
| 22 | +2. Clone your fork locally: |
| 23 | + ```bash |
| 24 | + git clone https://github.com/<your-username>/open-cluster-management-io.github.io.git |
| 25 | + cd open-cluster-management-io.github.io |
| 26 | + ``` |
26 | 27 |
|
27 | | -## Special Note |
| 28 | +3. Install Hugo (version 0.110.0 or later recommended) |
28 | 29 |
|
29 | | -- We're using the website to redirect requests targeting `open-cluster-management.io` to `github.com/open-cluster-management-io`, you can find more details in this [PR](https://github.com/open-cluster-management-io/open-cluster-management-io.github.io/pull/430). It allows developers to use commands like `go get open-cluster-management.io/<repo>` and also use `open-cluster-management.io/<repo>` as the import path in go.mod. |
30 | | -- We're using the website to redirect requests targeting `open-cluster-management.io/helm-charts` to `github.com/open-cluster-management-io/helm-charts`, you can find more details in this [PR](https://github.com/open-cluster-management-io/open-cluster-management-io.github.io/pull/453). |
| 30 | +4. Start the local development server: |
| 31 | + ```bash |
| 32 | + hugo server |
| 33 | + ``` |
| 34 | + |
| 35 | +5. Open your browser to http://localhost:1313 to view the site |
| 36 | + |
| 37 | +6. Edit files in the `content/` directory. The browser will automatically reload to show your changes. |
| 38 | + |
| 39 | +### Submitting Changes |
| 40 | + |
| 41 | +1. Make your changes in a new branch |
| 42 | +2. Test your changes locally |
| 43 | +3. Commit and push your changes |
| 44 | +4. Submit a pull request |
| 45 | + |
| 46 | +All pull requests are automatically tested by CI. Check the job results for any errors that need to be addressed. |
| 47 | + |
| 48 | +## Repository Structure |
| 49 | + |
| 50 | +- `content/` - Website content in Markdown format |
| 51 | +- `layouts/` - Hugo layout templates |
| 52 | +- `static/` - Static assets (images, files, etc.) |
| 53 | +- `assets/` - Source assets for processing |
| 54 | +- `hugo.yaml` - Hugo configuration file |
| 55 | + |
| 56 | +## Special Redirects |
| 57 | + |
| 58 | +This website also serves as a redirect service for Go module imports: |
| 59 | + |
| 60 | +- Requests to `open-cluster-management.io/<repo>` redirect to `github.com/open-cluster-management-io/<repo>` |
| 61 | +- Requests to `open-cluster-management.io/helm-charts` redirect to the official Helm charts repository |
| 62 | + |
| 63 | +This allows developers to use `go get open-cluster-management.io/<repo>` and import packages using the `open-cluster-management.io/<repo>` path. |
| 64 | + |
| 65 | +## License |
| 66 | + |
| 67 | +This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details. |
0 commit comments