Skip to content

Commit

Permalink
Small changes to README (#748)
Browse files Browse the repository at this point in the history
  • Loading branch information
jshaughn authored Jan 17, 2024
1 parent 85ad509 commit a86c545
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 32 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ URL_IGNORE:=$(URL_IGNORE)$(NEW_URLS)
## validate-site: Builds the site and validates the pages. This is used for CI
.PHONY: validate-site
validate-site: build-hugo
${DORP} run -t -i --rm -v "$(shell pwd)":/site:z -w /site ${KIALI_HUGO_IMAGE} /bin/bash -c "cd themes/docsy && npm install && cd ../.. && npm prune && npm config set fetch-retry-mintimeout 20000 && npm config set fetch-retry-maxtimeout 120000 && hugo && htmlproofer --typhoeus '{\"connecttimeout\": 30, \"timeout\": 30, \"headers\":{\"User-Agent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36\"}}' --hydra='{\"max_concurrency\": 6}' --allow-hash-href --allow-missing-href --ignore-empty-alt --ignore-missing-alt --no-check-external-hash --no-check-internal-hash --no-enforce-https --ignore_status_codes "302" --ignore-urls \"${URL_IGNORE}\" ./public"
${DORP} run -t -i --rm -v "$(shell pwd)":/site:z -w /site ${KIALI_HUGO_IMAGE} /bin/bash -c "cd themes/docsy && npm install && cd ../.. && npm prune && npm config set fetch-retry-mintimeout 20000 && npm config set fetch-retry-maxtimeout 120000 && hugo && htmlproofer --typhoeus '{\"connecttimeout\": 60, \"timeout\": 60, \"headers\":{\"User-Agent\":\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36\"}}' --hydra='{\"max_concurrency\": 6}' --allow-hash-href --allow-missing-href --ignore-empty-alt --ignore-missing-alt --no-check-external-hash --no-check-internal-hash --no-enforce-https --ignore_status_codes "302" --ignore-urls \"${URL_IGNORE}\" ./public"
58 changes: 29 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Kiali.io

[![title="Netlify Status"](https://api.netlify.com/api/v1/badges/05b3eed1-6ea2-41a1-8b64-c76bda241be6/deploy-status)](https://app.netlify.com/sites/kiali/deploys)
Expand All @@ -8,6 +7,7 @@ This repository contains the source code for the [http://kiali.io](http://kiali.
The website is written using markdown, the [Docsy](https://www.docsy.dev/) theme, and generated using [Hugo](https://gohugo.io). It is hosted on Github and deployed using netlify.

## Table of Contents

- [Requirements](#requirements)
- [Configuring and Running](#configuring-and-running)
- [Upgrading Hugo Version](#upgrading-hugo-version)
Expand All @@ -20,12 +20,11 @@ The website is written using markdown, the [Docsy](https://www.docsy.dev/) theme

To run the website locally, you will need:

* [Podman](https://podman.io) or [Docker](https://docker.io)
* [GNU Make](https://www.gnu.org/software/make/)
- [Podman](https://podman.io) or [Docker](https://docker.io)
- [GNU Make](https://www.gnu.org/software/make/)

Generally `podman` is easier to setup.


## Configuring and Running

Hugo has a command to run a small, self-contained web server locally, so you can test the website without having to upload/deploy it anywhere. The server supports live-reload, so changes to the content will reflect into the browser as they happen.
Expand All @@ -36,33 +35,34 @@ To run the server, you need to run the following on a terminal:
make serve
```

> :warning:
> :warning:
> If you are using Docker, you need to set `DORP` when starting the server; e.g:
>
> ```
> make -e DORP=docker serve
> ```
>
> On ARM-based Macs, you'll need to run following command first:
>
> ```
> export DOCKER_DEFAULT_PLATFORM=linux/amd64
> ```
If everything is working as expected, you should see something like this:
If everything is working as expected, you should see something like this (if not see [Upgrading Hugo Version](#upgrading-hugo-version)):
```
| EN
+------------------+------+
Pages | 1353
Paginator pages | 0
Non-page files | 0
Static files | 119
Processed images | 0
Aliases | 155
Sitemaps | 1
Cleaned | 0

Total in 15304 ms
Watching for changes in /site/{content,data,layouts,static,themes}
Watching for config changes in /site/config.toml
| EN
-------------------+------
Pages | 151
Paginator pages | 0
Non-page files | 1
Static files | 323
Processed images | 2
Aliases | 4
Sitemaps | 1
Cleaned | 0

Built in 1313 ms
Environment: "development"
Serving pages from memory
Web Server is available at http://localhost:1313/ (bind address 0.0.0.0)
Expand All @@ -73,27 +73,27 @@ The server should be available on [http://localhost:1313](http://localhost:1313)
## Upgrading Hugo version
The current version of Hugo used to build the site is defined in [netlify.toml](./netlify.toml) and in the [Makefile](./Makefile). Make sure the versions defined in both places are the same or, at minimum, compatible.
The current version of Hugo used to build the site is defined in [netlify.toml](./netlify.toml) and in the [Makefile](./Makefile). Make sure the versions defined in both places are the same or, at minimum, compatible. If `make serve` fails you may need to upgrade Hugo.
When upgrading to a new version of Hugo, change the versions in both files mentioned above and then rebuild your dev container image by passing in `-e FORCE_BUILD=true` when running make (e.g. `make -e FORCE_BUILD=true serve`).
When upgrading to a new version of Hugo, change the versions in both files mentioned above and then rebuild your dev container image by passing in `-e FORCE_BUILD=true` when running make (e.g. `make -e FORCE_BUILD=true build-hugo`).
## Documentation Versioning
The documentation is versioned using a branch strategy. The `master` branch holds all new content. On each Kiali release `master` will be captured in a versioned branch. This typically happens every three weeks.
The documentation is versioned using a branch strategy. The `staging` branch holds all new content. On each Kiali release `staging` will be captured in the `current` branch and the former `current` branch will be captured in a versioned branch. This typically happens every three weeks. Changes to
`staging` will be applied to all future releases. Backport or update the `current`, or any other versioned branch, as needed.
## Production Deployment
Deployment is done automatically when a pull request is merged, and preview deployments are also done for each PR, so you can verify that your changes will work in production before actually deploying.
## Directory Structure
The directory structure is typical for projects using the [Docsy](https://www.docsy.dev/) theme. A couple of notes:
* The site only supports English and as such, all content is under `content/en`.
* The site minimizes customization but custom CSS is found in `assets/scss`.
* The site keeps consolidates static content under `static`.
* e.g. images are under `static\images`
The directory structure is typical for projects using the [Docsy](https://www.docsy.dev/) theme. A couple of notes:
- The site only supports English and as such, all content is under `content/en`.
- The site minimizes customization but custom CSS is found in `assets/scss`.
- The site keeps consolidates static content under `static`.
- e.g. images are under `static\images`
## License and Code of Conduct
Expand Down
6 changes: 4 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ title = "Kiali"

enableRobotsTXT = true

# Increase page rendering timeout because we occasionally take longer then the 30s default
timeout = 45

# Hugo allows theme composition (and inheritance). The precedence is from left to right.
theme = ["docsy"]

Expand Down Expand Up @@ -280,5 +283,4 @@ enable = false

[[params.versions]]
version = "archive"
url = "https://pre-v1-41.kiali.io"

url = "https://pre-v1-41.kiali.io"

0 comments on commit a86c545

Please sign in to comment.