You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As early as 5d721a7 (readme is markdown, 2012-03-08), the `README` was
written in Markdown, but its Unix shell command snippets were not marked
up as such (most likely because way back when, syntax highlighting in
`<pre>` blocks had not yet been dreamt up).
However, we are approaching the end of the first quarter of the 21st
century and it is time to go with the times.
Signed-off-by: Johannes Schindelin <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+58-26Lines changed: 58 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,97 +55,129 @@ To render the site locally, you'll need [Hugo](https://gohugo.io/)'s **extended*
55
55
56
56
You can verify the Hugo version like this:
57
57
58
-
$ hugo version
59
-
hugo v0.128.0+extended linux/amd64 BuildDate=unknown
58
+
```console
59
+
$ hugo version
60
+
hugo v0.128.0+extended linux/amd64 BuildDate=unknown
61
+
```
60
62
61
63
You can serve the site locally via:
62
64
63
-
$ node script/serve-public.js
65
+
```console
66
+
$ node script/serve-public.js
67
+
```
64
68
65
69
The site should be running on http://127.0.0.1:5000.
66
70
67
71
If you want to serve the site via Hugo's built-in mechanism, you will need to turn off ["ugly URLs"](https://gohugo.io/content-management/urls/#appearance), by running this command, which will serve the site via http://127.0.0.1:1313:
68
72
69
-
$ HUGO_UGLYURLS=false hugo serve -w
73
+
```console
74
+
$ HUGO_UGLYURLS=false hugo serve -w
75
+
```
70
76
71
77
Side note: What _are_ "ugly URLs"? Hugo, by default, generates "pretty" URLs like https://git-scm.com/about/ (note the trailing slash) instead of what it calls "ugly" URLs like https://git-scm.com/about.html. However, since GitHub Pages auto-resolves "even prettier" URLs like https://git-scm.com/about by appending `.html` first, we _want_ the "ugly" URLs to be used here. The `serve-public.js` script emulates GitHub Pages' behavior, while `hugo serve` does not.
72
78
73
79
Pro-Tip: Do this in a sparse checkout that excludes large parts of `content/`, to speed up the rendering time.
74
80
75
81
To test the site locally _with_ the search enabled, run this instead:
76
82
77
-
$ hugo
78
-
$ npx -y pagefind --site public
79
-
$ node script/serve-public.js
83
+
```console
84
+
$ hugo
85
+
$ npx -y pagefind --site public
86
+
$ node script/serve-public.js
87
+
```
80
88
81
89
You can also use Pagefind's built-in server (which will be running on http://127.0.0.1:1414), but again, you have to turn off "ugly URLs":
82
90
83
-
$ HUGO_UGLYURLS=false hugo
84
-
$ npx -y pagefind --site public --serve
91
+
```console
92
+
$ HUGO_UGLYURLS=false hugo
93
+
$ npx -y pagefind --site public --serve
94
+
```
85
95
86
96
Note that running Pagefind will make the process about 7 times slower, and the site will not be re-rendered and live-reloaded in the browser when you change files in `content/` (unlike with `hugo serve -w`).
87
97
88
98
## Update manual pages
89
99
90
100
First, install the Ruby prerequisites:
91
101
92
-
$ bundler install
102
+
```console
103
+
$ bundler install
104
+
```
93
105
94
106
Then, you can build the manual pages using a local Git source clone like this:
95
107
96
-
$ ruby ./script/update-docs.rb /path/to/git/.git en
108
+
```console
109
+
$ ruby ./script/update-docs.rb /path/to/git/.git en
110
+
```
97
111
98
112
This will populate the manual pages for all Git versions. You can also populate them only for a specific Git version (faster):
99
113
100
-
$ version=v2.23.0
101
-
$ REBUILD_DOC=$version ruby ./script/update-docs.rb /path/to/git/.git en
114
+
```console
115
+
$ version=v2.23.0
116
+
$ REBUILD_DOC=$version ruby ./script/update-docs.rb /path/to/git/.git en
117
+
```
102
118
103
119
Or you can populate the man pages from GitHub (much slower) like this:
If you have 2FA enabled, you'll need to create a [Personal Access Token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/).
145
175
146
176
If you want to build the book for all available languages, just omit the language code parameter:
0 commit comments