| 1 |
# gocloud.dev source |
| 2 |
|
| 3 |
Source for the [gocloud.dev website][]. Powered by [Hugo][]. |
| 4 |
|
| 5 |
[gocloud.dev website]: https://gocloud.dev/ |
| 6 |
[Hugo]: https://gohugo.io/ |
| 7 |
|
| 8 |
## Local Development |
| 9 |
|
| 10 |
Use local hugo server for preview. `cd` into this directory and run: |
| 11 |
|
| 12 |
``` |
| 13 |
$ hugo server -D |
| 14 |
``` |
| 15 |
|
| 16 |
This will run the Hugo server that auto-updates its output based on the source |
| 17 |
contents. It will print out the `localhost:<PORT>` URL to point the browser to. |
| 18 |
|
| 19 |
This was tested with Hugo 0.53 but should work with subsequent versions as well. |
| 20 |
|
| 21 |
## Editing |
| 22 |
|
| 23 |
Use `hugo new foo/page.md` to create `content/foo/page.md`. This will |
| 24 |
automatically add the appropriate [Front Matter][] to the site. After modifying |
| 25 |
an existing page, add the `lastmod` attribute with the current ISO date, which |
| 26 |
you can obtain with `date -I`. For example: |
| 27 |
|
| 28 |
```yaml |
| 29 |
--- |
| 30 |
title: Foo |
| 31 |
date: "2019-03-17T09:00:00-07:00" |
| 32 |
lastmod: "2019-03-18T13:30:12-07:00" |
| 33 |
--- |
| 34 |
|
| 35 |
... |
| 36 |
``` |
| 37 |
|
| 38 |
[Front Matter]: https://gohugo.io/content-management/front-matter/ |