Skip to content

Commit 0499324

Browse files
authored
docs: Update docs/README.md and Hugo Relearn to 5.23.0 (#6251)
Minor updates of the Hugo documentation: - The current Ubuntu `snap` package of Hugo is not supported by the docs. We should take a first minor step towards fixing this. - [`doc/README.md`](https://github.com/xapi-project/xen-api/blob/master/doc/README.md) is outdated and should be updated ([new version](https://github.com/xenserver-next/xen-api/blob/docs-update-README-and-hugo-relearn-to-5.23/doc/README.md)). It says that the Ubuntu snap of Hugo works, but it does not anymore. Fix this by updating the outdated information. - An initial fix is to update the Relearn theme from 5.20.x to 5.23.0: - It does not introduce breaking changes. - It introduces more straightforward page links and deprecates older syntax. - Fix the warnings by updating relative links accordingly. A preview is available on my site: https://xenserver-next.github.io/xen-api/index.html
2 parents bc62e4c + 26264f9 commit 0499324

File tree

12 files changed

+59
-17
lines changed

12 files changed

+59
-17
lines changed

doc/README.md

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,51 @@
1-
Quick start guide:
1+
# Quick start guide:
22

33
- Visit https://xapi-project.github.io/new-docs/ to view the current documentation.
4+
5+
## Required software
6+
7+
The docs use Hugo and the [Hugo Relearn theme](https://mcshelby.github.io/hugo-theme-relearn),
8+
an enhanced fork of the popular Hugo Learn theme.
9+
10+
### Compatible versions
11+
12+
Due to a number of gradual changes in Hugo and Relearn,
13+
the docs are currently only compatible with specific older versions of Hugo and Relearn.
14+
15+
Hugo v0.121.0 to ~v0.127.0 (the current version of the Ubuntu `snap` is too recent)
16+
- Fixes to support newer versions are forthcoming.
17+
18+
Hugo Relearn 5.24.0 (defined by a git tag in doc/go.mod)
19+
- Note: Hugo Relearn >= 5.25 currently trigger additional warnings due to deprecations.
20+
- Further updates fix this situation are forthcoming step by step.
21+
22+
Hugo Relearn >= 5.24.0 and < 6.x are expected to work:
23+
- https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/5/index.html#5-24-0
24+
- Breaking changes in Relearn 6.0.0:
25+
https://mcshelby.github.io/hugo-theme-relearn/introduction/releasenotes/6/#6-0-0
26+
27+
## Installation
28+
429
- Install Hugo; follow the guidance on https://gohugo.io/getting-started/installing.
5-
You'll need Go as well: see https://go.dev/
6-
- On Ubuntu 22.04 and older, use `sudo snap install hugo` to get the needed newer version of `hugo`.
30+
You'll need to install Go as well: see https://go.dev/
31+
- Hugo installation is described at https://gohugo.io/installation
32+
- On Ubuntu 24.04, the version installed by `apt` works.
33+
- On Ubuntu 22.04 and older:
34+
- `apt-get install hugo` would install a version that is too old.
35+
- `sudo snap install hugo` installs a too recent version
36+
37+
- To install Hugo from source, you need a recent `golang-1.2x` compiler:
38+
- On Ubuntu 22.04, this can be done with:
39+
```bash
40+
sudo apt install golang-1.23-go
41+
# Add it to your path, assuming your .local/bin/ is early in your PATH:
42+
ln -s /usr/lib/go-1.23/bin/go ~/.local/bin/go
43+
go version
44+
go install github.com/gohugoio/hugo@v0.127.0
45+
```
46+
47+
## Development
48+
749
- Run a local server: `hugo server`
850
- Open a browser at http://127.0.0.1:1313/new-docs/
951
- Add content to `doc/content/`:

doc/content/design/cpu-levelling-v2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The old XS 5.6-style Heterogeneous Pool feature that is based around hardware-le
2929
History
3030
=======
3131

32-
- Original XS 5.6 design: [heterogeneous-pools](../heterogeneous-pools)
32+
- Original XS 5.6 design: [heterogeneous-pools](heterogeneous-pools)
3333
- Changes made in XS 5.6 FP1 for the DR feature (added CPUID checks upon migration)
3434
- XS 6.1: migration checks extended for cross-pool scenario
3535

doc/content/design/local-database.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ We propose to:
2525
this should reduce the number of RPCs across the network.
2626

2727
In a later phase we can move to a completely
28-
[distributed database](../distributed-database).
28+
[distributed database](distributed-database/index).
2929

3030
Replicating the database
3131
------------------------

doc/content/design/multiple-cluster-managers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ revision_history:
1414
Introduction
1515
------------
1616

17-
Xapi currently uses a cluster manager called [xhad](../../features/HA/HA.html). Sometimes other software comes with its own built-in way of managing clusters, which would clash with xhad (example: xhad could choose to fence node 'a' while the other system could fence node 'b' resulting in a total failure). To integrate xapi with this other software we have 2 choices:
17+
Xapi currently uses a cluster manager called [xhad](../toolstack/features/HA/index). Sometimes other software comes with its own built-in way of managing clusters, which would clash with xhad (example: xhad could choose to fence node 'a' while the other system could fence node 'b' resulting in a total failure). To integrate xapi with this other software we have 2 choices:
1818

1919
1. modify the other software to take membership information from xapi; or
2020
2. modify xapi to take membership information from this other software.
@@ -70,4 +70,4 @@ The `xapi.conf` file will have a new field: `cluster-stack-root` which will have
7070

7171
In `Pool.enable_ha` with `cluster_stack="foo"` we will verify that the subdirectory `<cluster-stack-root>/foo` exists. If it does not exist, then the call will fail with `UNKNOWN_CLUSTER_STACK`.
7272

73-
Alternative cluster stacks will need to conform to the exact same interface as [xhad](../../features/HA/HA.html).
73+
Alternative cluster stacks will need to conform to the exact same interface as [xhad](../toolstack/features/HA).

doc/content/design/ocfs2/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ Summary of the impact on the admin
461461

462462
OCFS2 is fundamentally a different type of storage to all existing storage
463463
types supported by xapi. OCFS2 relies upon O2CB, which provides
464-
[Host-level High Availability](../../../features/HA/HA.html). All HA implementations
464+
[Host-level High Availability](../../toolstack/features/HA/index). All HA implementations
465465
(including O2CB and `xhad`) impose restrictions on the server admin to
466466
prevent unnecessary host "fencing" (i.e. crashing). Once we have OCFS2 as
467467
a feature, we will have to live with these restrictions which previously only

doc/content/toolstack/features/DR/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title = "Disaster Recovery"
33
+++
44

5-
The [HA](../HA/HA.html) feature will restart VMs after hosts have failed, but what
5+
The [HA](HA) feature will restart VMs after hosts have failed, but what
66
happens if a whole site (e.g. datacenter) is lost? A disaster recovery
77
configuration is shown in the following diagram:
88

doc/content/toolstack/features/snapshots/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Snapshots represent the state of a VM, or a disk (VDI) at a point in time. They
88
- experiments (take snapshot, try something, revert back again)
99
- golden images (install OS, get it just right, clone it 1000s of times)
1010

11-
Read more about [the Snapshot APIs](../../xen-api/snapshots.html).
11+
Read more about [the Snapshot APIs](../../../xen-api/topics/snapshots).
1212

1313
Disk snapshots
1414
==============

doc/content/xapi/cli/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,5 +179,5 @@ Yet other commands do not actually do any XenAPI calls, but instead get "helpful
179179

180180
The following tutorials show how to extend the CLI (and XenAPI):
181181

182-
- [Adding a field]({{< relref "../guides/howtos/add-field.md" >}})
183-
- [Adding an operation]({{< relref "../guides/howtos/add-function.md" >}})
182+
- [Adding a field](../guides/howtos/add-field)
183+
- [Adding a function](../guides/howtos/add-function)

doc/content/xapi/guides/howtos/add-class.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ This document describes how to add a new class to the data model that
66
defines the Xen Server API. It complements two other documents that
77
describe how to extend an existing class:
88

9-
* [Adding a Field]({{< ref add-field.md >}})
10-
* [Adding a Function]({{< ref add-function.md >}})
9+
* [Adding a field](add-field)
10+
* [Adding a function](add-function)
1111

1212
As a running example, we will use the addition of a class that is part
1313
of the design for the PVS Direct feature. PVS Direct introduces

doc/content/xen-api/topics/snapshots.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ They can be used for:
1111
- experiments (take snapshot, try something, revert back again)
1212
- golden images (install OS, get it just right, clone it 1000s of times)
1313

14-
Read more about [Snapshots: the High-Level Feature](../features/snapshots/snapshots.html).
14+
Read more about [Snapshots: the High-Level Feature](../../toolstack/features/snapshots/index).
1515

1616
Taking a VDI snapshot
1717
=====================

0 commit comments

Comments
 (0)