Skip to content

Commit f41f68b

Browse files
turboFeiclaude
andauthored
[AMORO-3977] Combine amoro-site to prevent docs loose sync (apache#3979)
* clone site * remove invalid soft links * docs soft link * Update site/README.md with clear structure documentation - Reorganized documentation to show the versioned and non-versioned content structure - Provided a clear directory tree representation of the site structure - Updated instructions for running the documentation site locally - Added section on testing both sites together 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Update site/README.md with clear structure documentation - Fixed references to make it clear this is part of the main repository - Updated section titles to match the new organization - Clarified paths for versioned and non-versioned content - Simplified local development instructions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * github action * ignore * rat exclude site * test * test please * Revert "test please" This reverts commit 7c536fe. * label --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent ad6d775 commit f41f68b

156 files changed

Lines changed: 19753 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/labeler.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
- "*.md"
4141
- "docs/**/*"
4242

43+
"type:site":
44+
- "site/**/*"
45+
4346
"module:common":
4447
- "amoro-common/**/*"
4548

.github/workflows/site-deploy.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Deploy Site
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- '[0-9]+.[0-9]+.[0-9]+'
8+
paths:
9+
- 'site/**'
10+
- 'docs/**'
11+
tags:
12+
- 'v[0-9]+.[0-9]+.[0-9]+'
13+
- 'v[0-9]+.[0-9]+.[0-9]+-incubating'
14+
15+
jobs:
16+
deploy-site-page:
17+
if: github.ref == 'refs/heads/master'
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Setup Hugo
25+
uses: peaceiris/actions-hugo@v2
26+
with:
27+
hugo-version: 'latest'
28+
extended: true
29+
30+
- name: Build
31+
run: cd site/amoro-site && hugo -b https://amoro.apache.org/ -d ../../output
32+
33+
- name: Deploy
34+
uses: peaceiris/actions-gh-pages@v3
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
publish_dir: ./output
38+
publish_branch: asf-site
39+
destination_dir: ./output
40+
keep_files: true
41+
42+
deploy-latest-docs-page:
43+
needs: deploy-site-page
44+
if: github.ref == 'refs/heads/master'
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v3
48+
49+
- name: Setup Hugo
50+
uses: peaceiris/actions-hugo@v2
51+
with:
52+
hugo-version: 'latest'
53+
extended: true
54+
55+
- name: Build
56+
run: cd site/amoro-docs && hugo -b https://amoro.apache.org/docs/latest -d ../../output/docs/latest
57+
58+
- name: Deploy
59+
uses: peaceiris/actions-gh-pages@v3
60+
with:
61+
github_token: ${{ secrets.GITHUB_TOKEN }}
62+
publish_dir: ./output/docs/latest
63+
publish_branch: asf-site
64+
destination_dir: ./output/docs/latest
65+
keep_files: true
66+
67+
deploy-versioned-docs-page:
68+
if: (github.ref != 'refs/heads/master' && (startsWith(github.ref, 'refs/heads/') || startsWith(github.ref, 'refs/tags/')))
69+
runs-on: ubuntu-latest
70+
continue-on-error: true
71+
steps:
72+
- uses: actions/checkout@v3
73+
74+
- name: Set output
75+
id: vars
76+
run: |
77+
if [[ $GITHUB_REF == refs/tags/* ]]; then
78+
# For tags, remove the 'v' prefix if present
79+
VERSION=${GITHUB_REF#refs/tags/}
80+
VERSION=${VERSION#v}
81+
# Remove -incubating suffix if present
82+
VERSION=${VERSION%-incubating}
83+
echo "branch_name=${VERSION}" >> $GITHUB_OUTPUT
84+
else
85+
# For branches, use the branch name
86+
echo "branch_name=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
87+
fi
88+
89+
- name: Setup Hugo
90+
uses: peaceiris/actions-hugo@v2
91+
with:
92+
hugo-version: 'latest'
93+
extended: true
94+
95+
- name: Build
96+
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 }}
97+
98+
- name: Deploy
99+
uses: peaceiris/actions-gh-pages@v3
100+
with:
101+
github_token: ${{ secrets.GITHUB_TOKEN }}
102+
publish_dir: ./output/docs/${{ steps.vars.outputs.branch_name }}
103+
publish_branch: asf-site
104+
destination_dir: ./output/docs/${{ steps.vars.outputs.branch_name }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,5 +73,10 @@ conf/
7373
amoro-web/src/main/resources/static/
7474
amoro-web/node/
7575

76+
# Hugo generated directories
77+
public
78+
resources
79+
!javadoc/resources
80+
7681
!dist/src/main/amoro-bin/bin/
7782
!dist/src/main/amoro-bin/conf/

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,6 +1464,7 @@
14641464
<exclude>**/components.d.ts</exclude>
14651465
<exclude>**/Chart.lock</exclude>
14661466
<exclude>dev/deps/**</exclude>
1467+
<exclude>site/**</exclude>
14671468
<!-- artifacts created during release process -->
14681469
<exclude>release/**</exclude>
14691470
</excludes>

site/README.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
<!--
2+
- Licensed to the Apache Software Foundation (ASF) under one
3+
- or more contributor license agreements. See the NOTICE file
4+
- distributed with this work for additional information
5+
- regarding copyright ownership. The ASF licenses this file
6+
- to you under the Apache License, Version 2.0 (the
7+
- "License"); you may not use this file except in compliance
8+
- with the License. You may obtain a copy of the License at
9+
-
10+
- http://www.apache.org/licenses/LICENSE-2.0
11+
-
12+
- Unless required by applicable law or agreed to in writing,
13+
- software distributed under the License is distributed on an
14+
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
- KIND, either express or implied. See the License for the
16+
- specific language governing permissions and limitations
17+
- under the License.
18+
-->
19+
20+
# Apache Amoro Documentation Site
21+
22+
This directory contains the documentation site infrastructure for Apache Amoro.
23+
It's built with [Hugo](https://gohugo.io/) and hosted at https://amoro.apache.org.
24+
25+
# Structure
26+
27+
The Amoro documentation site consists of both versioned and non-versioned content, organized as follows:
28+
29+
```
30+
.
31+
├── docs (versioned)
32+
│ ├── admin-guides
33+
│ ├── concepts
34+
│ ├── engines
35+
│ ├── formats
36+
│ ├── images
37+
│ └── user-guides
38+
└── site (non-versioned)
39+
├── amoro-docs
40+
│ ├── archetypes
41+
│ ├── content (symlink to ../../docs)
42+
│ ├── hugo.toml
43+
│ └── themes
44+
├── amoro-site
45+
│ ├── archetypes
46+
│ ├── content
47+
│ ├── hugo.toml
48+
│ └── themes
49+
├── amoro-theme
50+
└── README.md
51+
```
52+
53+
## Organization of Documentation Content
54+
55+
The documentation is organized into versioned and non-versioned content:
56+
57+
- **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.
58+
59+
- **Non-versioned Content** (`/site`): The website infrastructure and common pages shared across all versions are maintained in the `/site` directory, which includes:
60+
- `amoro-site`: Contains the landing page and common content
61+
- `amoro-docs`: Contains the documentation site that renders versioned content (via symlink to `/docs`)
62+
- `amoro-theme`: Contains the Hugo theme used by both sites
63+
64+
During each new release, the release manager will:
65+
1. Create a branch from master named for the release version
66+
2. Update the latest branch HEAD to point to the release branch HEAD
67+
68+
# How to Contribute
69+
70+
## Submitting Pull Requests
71+
72+
- **Version-specific content**: Changes to the markdown contents for version-specific pages should be submitted to the `/docs` directory.
73+
74+
- **Non-versioned content**: Changes to common pages, website appearance (HTML, CSS), etc. should be submitted to the `/site` directory.
75+
76+
- **Old version documentation**: Changes to documentation of old Amoro versions should be submitted against the specific version branch.
77+
78+
## Reporting Issues
79+
80+
All issues related to the doc website should be submitted to the [Amoro repository](https://github.com/apache/amoro).
81+
82+
## Running Locally
83+
84+
To run the website locally:
85+
86+
```shell
87+
# From the root of the repository
88+
```
89+
90+
To start the site page locally, run:
91+
```shell
92+
(cd site/amoro-site && hugo serve)
93+
```
94+
95+
To start the documentation site locally, run:
96+
```shell
97+
(cd site/amoro-docs && hugo serve)
98+
```
99+
100+
## Testing Both Sites Together
101+
102+
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:
103+
104+
First, build the main site:
105+
```
106+
cd site/amoro-site
107+
hugo -b http://localhost:5500/ -d ../../public
108+
```
109+
110+
Next, build the docs site:
111+
```
112+
cd ../amoro-docs
113+
hugo -b http://localhost:5500/docs/latest/ -d ../../public/docs/latest
114+
```
115+
116+
You can then serve the combined site from the `public` directory using any local server.
117+
118+
## Scanning For Broken Links
119+
120+
To scan for broken links, you can use the linkcheck tool available [here](https://github.com/filiph/linkcheck).

site/amoro-docs/.hugo_build.lock

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: "{{ replace .Name "-" " " | title }}"
3+
date: {{ .Date }}
4+
draft: true
5+
---
6+

site/amoro-docs/content

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../docs

site/amoro-docs/hugo.toml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
baseURL = ""
2+
canonifyURLs = "true"
3+
relativeURLs = "true"
4+
languageCode = "en-us"
5+
title = "Amoro"
6+
theme= "amoro-theme"
7+
8+
[params]
9+
siteType = "docs"
10+
search = true
11+
versions.iceberg = "" # This is populated by the github deploy workflow and is equal to the branch name
12+
versions.nessie = "0.59.0"
13+
latestVersions.iceberg = "0.5.0" # This is used for the version badge on the "latest" site version
14+
BookSection='docs' # This determines which directory will inform the left navigation menu
15+
disableHome=true
16+
17+
[outputFormats.SearchIndex]
18+
baseName = "search"
19+
mediaType = "application/json"
20+
21+
[outputs]
22+
home = [ "HTML", "RSS", "SearchIndex" ]
23+
24+
[menu]
25+
26+
topnav = [
27+
{ name = "Quickstart", pre = "relative", url = "../../quick-start/", weight = 100 },
28+
{ name = "Docs", weight = 200 },
29+
{ name = "latest", parent = "Docs", pre = "relative", url = "../../docs/latest/", weight = 201 },
30+
{ name = "0.8.1-incubating", parent = "Docs", pre = "relative", url = "../../docs/0.8.1/", weight = 202 },
31+
{ name = "0.8.0-incubating", parent = "Docs", pre = "relative", url = "../../docs/0.8.0/", weight = 203 },
32+
{ name = "0.7.1-incubating", parent = "Docs", pre = "relative", url = "../../docs/0.7.1/", weight = 204 },
33+
{ name = "0.7.0-incubating", parent = "Docs", pre = "relative", url = "../../docs/0.7.0/", weight = 205 },
34+
{ name = "0.6.1", parent = "Docs", pre = "relative", url = "../../docs/0.6.1/", weight = 206 },
35+
{ name = "Benchmark", weight = 300 },
36+
{ name = "Benchmark Report", parent = "Benchmark", pre = "relative", url = "../../benchmark-report/", weight = 301 },
37+
{ name = "Benchmark Guide", parent = "Benchmark", pre = "relative", url = "../../benchmark-guide/", weight = 302 },
38+
{ name = "Download", pre = "relative", url = "../../download/", weight = 400 },
39+
{ name = "blogs", pre = "relative", url = "../../blogs/", weight = 500 },
40+
{ name = "Community", weight = 600 },
41+
{ name = "Join Community", parent = "Community", pre = "relative", url = "../../join-community/", weight = 601 },
42+
{ name = "How to contribute", parent = "Community", pre = "relative", url = "../../how-to-contribute/", weight = 602 },
43+
{ name = "ASF", weight = 700 },
44+
{ name = "Foundation", identifier = "_foundation", parent = "ASF", url = "https://www.apache.org/", weight = 701 },
45+
{ name = "License", identifier = "_license", parent = "ASF", url = "https://www.apache.org/licenses/", weight = 702 },
46+
{ name = "Donate", identifier = "_donate", parent = "ASF", url = "https://www.apache.org/foundation/sponsorship.html", weight = 703 },
47+
{ name = "Sponsors", identifier = "_sponsors", parent = "ASF", url = "https://www.apache.org/foundation/thanks.html", weight = 704 },
48+
{ name = "Security", identifier = "_security", parent = "ASF", url = "https://www.apache.org/security/", weight = 705 },
49+
{ name = "Privacy", identifier = "_privacy", parent = "ASF", url = "https://privacy.apache.org/policies/privacy-policy-public.html", weight = 706 }
50+
]
51+
52+
main = [ # Main menu, docs site left nav
53+
{ name = "Introduction", url = "/", weight = 1},
54+
{ name = "Concepts", weight = 100 },
55+
{ name = "Admin Guides", weight = 200},
56+
{ name = "User Guides", weight = 300},
57+
{ name = "Formats", weight = 400 },
58+
{ name = "Flink", weight = 500},
59+
{ name = "Spark", weight = 600},
60+
]
61+
62+
[markup.goldmark.renderer]
63+
unsafe= true

site/amoro-docs/themes/amoro-theme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../amoro-theme

0 commit comments

Comments
 (0)