Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
- "*.md"
- "docs/**/*"

"type:site":
- "site/**/*"

"module:common":
- "amoro-common/**/*"

Expand Down
104 changes: 104 additions & 0 deletions .github/workflows/site-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Deploy Site

on:
push:
branches:
- master
- '[0-9]+.[0-9]+.[0-9]+'
paths:
- 'site/**'
- 'docs/**'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-incubating'

jobs:
deploy-site-page:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true

- name: Build
run: cd site/amoro-site && hugo -b https://amoro.apache.org/ -d ../../output

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output
publish_branch: asf-site
destination_dir: ./output
keep_files: true

deploy-latest-docs-page:
needs: deploy-site-page
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true

- name: Build
run: cd site/amoro-docs && hugo -b https://amoro.apache.org/docs/latest -d ../../output/docs/latest

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output/docs/latest
publish_branch: asf-site
destination_dir: ./output/docs/latest
keep_files: true

deploy-versioned-docs-page:
if: (github.ref != 'refs/heads/master' && (startsWith(github.ref, 'refs/heads/') || startsWith(github.ref, 'refs/tags/')))
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3

- name: Set output
id: vars
run: |
if [[ $GITHUB_REF == refs/tags/* ]]; then
# For tags, remove the 'v' prefix if present
VERSION=${GITHUB_REF#refs/tags/}
VERSION=${VERSION#v}
# Remove -incubating suffix if present
VERSION=${VERSION%-incubating}
echo "branch_name=${VERSION}" >> $GITHUB_OUTPUT
else
# For branches, use the branch name
echo "branch_name=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
fi

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true

- name: Build
run: cd site/amoro-docs && hugo -b https://amoro.apache.org/docs/${{ steps.vars.outputs.branch_name }}/ -d ../../output/docs/${{ steps.vars.outputs.branch_name }}

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output/docs/${{ steps.vars.outputs.branch_name }}
publish_branch: asf-site
destination_dir: ./output/docs/${{ steps.vars.outputs.branch_name }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,10 @@ conf/
amoro-web/src/main/resources/static/
amoro-web/node/

# Hugo generated directories
public
resources
!javadoc/resources

!dist/src/main/amoro-bin/bin/
!dist/src/main/amoro-bin/conf/
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1464,6 +1464,7 @@
<exclude>**/components.d.ts</exclude>
<exclude>**/Chart.lock</exclude>
<exclude>dev/deps/**</exclude>
<exclude>site/**</exclude>
<!-- artifacts created during release process -->
<exclude>release/**</exclude>
</excludes>
Expand Down
120 changes: 120 additions & 0 deletions site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-->

# Apache Amoro Documentation Site

This directory contains the documentation site infrastructure for Apache Amoro.
It's built with [Hugo](https://gohugo.io/) and hosted at https://amoro.apache.org.

# Structure

The Amoro documentation site consists of both versioned and non-versioned content, organized as follows:

```
.
├── docs (versioned)
│ ├── admin-guides
│ ├── concepts
│ ├── engines
│ ├── formats
│ ├── images
│ └── user-guides
└── site (non-versioned)
├── amoro-docs
│ ├── archetypes
│ ├── content (symlink to ../../docs)
│ ├── hugo.toml
│ └── themes
├── amoro-site
│ ├── archetypes
│ ├── content
│ ├── hugo.toml
│ └── themes
├── amoro-theme
└── README.md
```

## Organization of Documentation Content

The documentation is organized into versioned and non-versioned content:

- **Versioned Content** (`/docs`): All markdown pages specific to an Amoro version are maintained in the main repository's `/docs` directory. These include user guides, admin guides, concepts, and other technical documentation.

- **Non-versioned Content** (`/site`): The website infrastructure and common pages shared across all versions are maintained in the `/site` directory, which includes:
- `amoro-site`: Contains the landing page and common content
- `amoro-docs`: Contains the documentation site that renders versioned content (via symlink to `/docs`)
- `amoro-theme`: Contains the Hugo theme used by both sites

During each new release, the release manager will:
1. Create a branch from master named for the release version
2. Update the latest branch HEAD to point to the release branch HEAD

# How to Contribute

## Submitting Pull Requests

- **Version-specific content**: Changes to the markdown contents for version-specific pages should be submitted to the `/docs` directory.

- **Non-versioned content**: Changes to common pages, website appearance (HTML, CSS), etc. should be submitted to the `/site` directory.

- **Old version documentation**: Changes to documentation of old Amoro versions should be submitted against the specific version branch.

## Reporting Issues

All issues related to the doc website should be submitted to the [Amoro repository](https://github.com/apache/amoro).

## Running Locally

To run the website locally:

```shell
# From the root of the repository
```

To start the site page locally, run:
```shell
(cd site/amoro-site && hugo serve)
```

To start the documentation site locally, run:
```shell
(cd site/amoro-docs && hugo serve)
```

## Testing Both Sites Together

In some cases, it's useful to test both the amoro site and the docs site together, especially for testing relative links between the two. This can be achieved by building both sites with custom `baseURL` and `publishDir` values:

First, build the main site:
```
cd site/amoro-site
hugo -b http://localhost:5500/ -d ../../public
```

Next, build the docs site:
```
cd ../amoro-docs
hugo -b http://localhost:5500/docs/latest/ -d ../../public/docs/latest
```

You can then serve the combined site from the `public` directory using any local server.

## Scanning For Broken Links

To scan for broken links, you can use the linkcheck tool available [here](https://github.com/filiph/linkcheck).
Empty file.
6 changes: 6 additions & 0 deletions site/amoro-docs/archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

1 change: 1 addition & 0 deletions site/amoro-docs/content
63 changes: 63 additions & 0 deletions site/amoro-docs/hugo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
baseURL = ""
canonifyURLs = "true"
relativeURLs = "true"
languageCode = "en-us"
title = "Amoro"
theme= "amoro-theme"

[params]
siteType = "docs"
search = true
versions.iceberg = "" # This is populated by the github deploy workflow and is equal to the branch name
versions.nessie = "0.59.0"
latestVersions.iceberg = "0.5.0" # This is used for the version badge on the "latest" site version
BookSection='docs' # This determines which directory will inform the left navigation menu
disableHome=true

[outputFormats.SearchIndex]
baseName = "search"
mediaType = "application/json"

[outputs]
home = [ "HTML", "RSS", "SearchIndex" ]

[menu]

topnav = [
{ name = "Quickstart", pre = "relative", url = "../../quick-start/", weight = 100 },
{ name = "Docs", weight = 200 },
{ name = "latest", parent = "Docs", pre = "relative", url = "../../docs/latest/", weight = 201 },
{ name = "0.8.1-incubating", parent = "Docs", pre = "relative", url = "../../docs/0.8.1/", weight = 202 },
{ name = "0.8.0-incubating", parent = "Docs", pre = "relative", url = "../../docs/0.8.0/", weight = 203 },
{ name = "0.7.1-incubating", parent = "Docs", pre = "relative", url = "../../docs/0.7.1/", weight = 204 },
{ name = "0.7.0-incubating", parent = "Docs", pre = "relative", url = "../../docs/0.7.0/", weight = 205 },
{ name = "0.6.1", parent = "Docs", pre = "relative", url = "../../docs/0.6.1/", weight = 206 },
{ name = "Benchmark", weight = 300 },
{ name = "Benchmark Report", parent = "Benchmark", pre = "relative", url = "../../benchmark-report/", weight = 301 },
{ name = "Benchmark Guide", parent = "Benchmark", pre = "relative", url = "../../benchmark-guide/", weight = 302 },
{ name = "Download", pre = "relative", url = "../../download/", weight = 400 },
{ name = "blogs", pre = "relative", url = "../../blogs/", weight = 500 },
{ name = "Community", weight = 600 },
{ name = "Join Community", parent = "Community", pre = "relative", url = "../../join-community/", weight = 601 },
{ name = "How to contribute", parent = "Community", pre = "relative", url = "../../how-to-contribute/", weight = 602 },
{ name = "ASF", weight = 700 },
{ name = "Foundation", identifier = "_foundation", parent = "ASF", url = "https://www.apache.org/", weight = 701 },
{ name = "License", identifier = "_license", parent = "ASF", url = "https://www.apache.org/licenses/", weight = 702 },
{ name = "Donate", identifier = "_donate", parent = "ASF", url = "https://www.apache.org/foundation/sponsorship.html", weight = 703 },
{ name = "Sponsors", identifier = "_sponsors", parent = "ASF", url = "https://www.apache.org/foundation/thanks.html", weight = 704 },
{ name = "Security", identifier = "_security", parent = "ASF", url = "https://www.apache.org/security/", weight = 705 },
{ name = "Privacy", identifier = "_privacy", parent = "ASF", url = "https://privacy.apache.org/policies/privacy-policy-public.html", weight = 706 }
]

main = [ # Main menu, docs site left nav
{ name = "Introduction", url = "/", weight = 1},
{ name = "Concepts", weight = 100 },
{ name = "Admin Guides", weight = 200},
{ name = "User Guides", weight = 300},
{ name = "Formats", weight = 400 },
{ name = "Flink", weight = 500},
{ name = "Spark", weight = 600},
]

[markup.goldmark.renderer]
unsafe= true
1 change: 1 addition & 0 deletions site/amoro-docs/themes/amoro-theme
Empty file.
6 changes: 6 additions & 0 deletions site/amoro-site/archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
draft: true
---

Loading