Debian Codegraph @

doc/README.md

raw
1 # Apache Avro website
2
3 This website is base on [Hugo](https://gohugo.io) and uses the [Docsy](https://www.docsy.dev/) theme.
4 Before building the website, you need to initialize submodules.
5
6 ```sh
7 hugo mod get -u
8 ```
9
10 ## Previewing the website locally
11
12 ```sh
13 # Serve the website dynamically using extended hugo:
14 hugo server --buildDrafts --buildFuture --bind 0.0.0.0 --navigateToChanged
15
16 # You can do the same thing without installing hugo via docker.
17 # From the Avro root directory:
18 docker run --rm -v $(pwd):/src -p 1313:1313 jakejarvis/hugo-extended:latest --source doc/ server \
19 --buildDrafts --buildFuture --bind 0.0.0.0 --navigateToChanged
20 ```
21
22 ## Building the website in a distribution
23
24 When you build an Avro distribution with the script, there is currently a manual step required.
25
26 After all the binary artifacts and source have been created and copied to the `dist/` directory, the process will
27 stop with **Build build/staging-web/ manually now. Press a key to continue...**
28
29 At this point, from another terminal and in the Avro root directory, you can build the website:
30
31 ```sh
32 # Install the necessary npm packages
33 docker run --entrypoint=sh --rm -v $(pwd):/src -p 1313:1313 jakejarvis/hugo-extended:latest \
34 -c "cd build/staging-web && npm install"
35 # Generate the website and the release documentation
36 docker run --rm -v $(pwd):/src -p 1313:1313 jakejarvis/hugo-extended:latest \
37 --source build/staging-web/ --gc --minify
38 # Optional: docker leaves some files with unmanageable permissions
39 sudo chown -R $USER:$USER build/staging-web
40 ```
41
42 ## New release
43
44 When a new version of Apache Avro is released:
45
46 1. Change the value of `params.avroversion` in `config.toml`
47 2. Add a new entry to the `Releases` pages in the `Blog` section, for example:
48
49 ```sh
50 cp content/en/blog/releases/avro-1.12.0-released.md content/en/blog/releases/avro-1.13.0-released.md
51 ```
52
53 ### Upload the docs
54
55 Copy the Markdown content from the release tar to the `doc/content/en/docs/1.12.0`:
56
57 ```sh
58 tar xvfz avro-src-1.12.0.tar.gz
59 ```
60
61 Here we need to copy everything, except the `api/` directory to this repository. The markdown will be rendered using Hugo, and the API docs are already html, and will be served from the ASF SVN. The `api/` directory needs to be uploaded to SVN:
62
63 ```sh
64 svn co https://svn.apache.org/repos/asf/avro/site
65 cd site/publish/docs/
66 mkdir 1.12.0
67 cd 1.12.0
68 mkdir api
69 cp -r ~/Desktop/avro-release-dist/avro-1.12.0/avro-doc-1.12.0/api/ api/
70 svn commit -m "Avro 1.12.0 release"
71 ```