Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add instructions on how to preview site using docker
  • Loading branch information
alamb committed May 11, 2024
commit 5233bf36ef2e000ad3c9cbc9554957a612269ac1
49 changes: 45 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

This website is built / powered by [Hugo](https://gohugo.io/), and extended from the [Docsy Theme](https://www.docsy.dev/).

The following steps assume that you have `hugo` installed and working.
The following steps assume that you have `hugo` installed and working.
You can also use docker, see the [Docker section](#docker) for more information.

## Building and Running Locally

Expand All @@ -14,21 +15,61 @@ cd parquet-site
git submodule update --init --recursive
```

To build or update your site’s CSS resources, you also need PostCSS to create the final assets. By default npm installs tools under the directory where you run npm install.
To build or update CSS resources, you also need PostCSS to create the final assets. By default npm installs tools under the directory where you run npm install.

```
npm install -D autoprefixer
npm install -D postcss-cli
npm install -D postcss
```

To run this website site locally, run the following in the root of the directory:
To preview this website site locally, run the following in the root of the directory:

```shell
hugo server
```

# Release Documentation
## Building and Running in Docker

If you don't want to install `hugo` and its dependencies local machine, you can use
docker to preview locally. First checkout the `parquet-site` explained above
and then run:

```shell
# run docker container mounting the current directory to /parquet-site and exposing port 1313
docker run -it -v `pwd`:/parquet-site -p 1313:1313 debian:bullseye-slim bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it better to use a dockerfile which is much easier to use? I'm just asking but not required to change. These steps are helpful enough.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A docker file is a good idea. I will make one


# Install necessary utilities
apt-get update
apt-get install wget git -y xz-utils

# Install extended version of hugo to /hugo
# See releases https://github.com/gohugoio/hugo/releases/tag/v0.124.1
# Note, if on amd64 use https://github.com/gohugoio/hugo/releases/download/v0.124.1/hugo_extended_0.124.1_linux-amd64.tar.gz
wget -O - https://github.com/gohugoio/hugo/releases/download/v0.124.1/hugo_extended_0.124.1_linux-arm64.tar.gz | tar xz

# install golang to /go
wget -O - https://go.dev/dl/go1.22.3.linux-amd64.tar.gz | tar xz

# install nodejs to /node-v20.13.1-linux-arm64
wget -O - https://nodejs.org/dist/v20.13.1/node-v20.13.1-linux-arm64.tar.xz | xz -d | tar x

# setup path to find binaries
export PATH=/:/go/bin:/node-v20.13.1-linux-arm64/bin:$PATH

# Install necessary npm modules in parquet-site directory
cd parquet-site
npm install -D autoprefixer
npm install -D postcss-cli
npm install -D postcss

# Run server
hugo server --bind 0.0.0.0
```

You can now preview the site locally on http://localhost:1313/

# Release Process

To create documentation for a new release of `parquet-format` create a new <releaseNumber>.md file under `content/en/blog/parquet-format`. Please see existing files in that directory as an example.

Expand Down