Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
64d0636
move website pages to the correct directory
317brian Mar 15, 2023
a43df92
delete old versions of static pages
317brian Mar 15, 2023
7f3c527
change 25.0 html files for the md files
317brian Mar 15, 2023
f431676
delete docs/latest since its the equivalent of 25
317brian Mar 15, 2023
2f57e12
remove blog
317brian Mar 15, 2023
b865da5
finish cleaning up website pages
317brian Mar 15, 2023
3135e47
add sidebars.json from druid repo
317brian Mar 16, 2023
adff615
update gitignore for docusaurus
317brian Mar 16, 2023
2b6e388
docusaurus2 matching current site
317brian Mar 22, 2023
26ae6fc
working redirect example
317brian Mar 22, 2023
210bff5
updated yarn.lock
317brian Mar 22, 2023
003547d
working redirect example
317brian Mar 22, 2023
f82fa8c
updated package-lock.json
317brian Mar 22, 2023
1daf455
working events widget. needs styling
317brian Mar 22, 2023
093c1b9
update how the event data is tagged to allow for styling
317brian Mar 23, 2023
8a35346
some styling
317brian Mar 23, 2023
75fbf3b
delete some jekyll files/duplicate files
317brian Mar 24, 2023
c20faba
fix color defaults including link color
317brian Mar 24, 2023
95fe452
dark nav bar to match current site
317brian Mar 24, 2023
b049802
working upcoming events and featured content widget. working key drui…
317brian Mar 25, 2023
d620ecd
delete old implementation of event widget
317brian Mar 25, 2023
4cc8c7f
fix typo
317brian Mar 27, 2023
67446f5
remove another jekyll file
317brian Mar 28, 2023
9e0583a
fix link
317brian Mar 31, 2023
789329b
update lock files
317brian Mar 31, 2023
3b66c8e
add recent releases widget
317brian Mar 31, 2023
5df928b
Add react-bootstrap components
ektravel Apr 7, 2023
f5d62ac
Update styling
ektravel Apr 12, 2023
2a95b4f
push css files
ektravel Apr 12, 2023
a1bfe43
Merge pull request #2 from ektravel/docusaurus2-conversion
317brian Apr 12, 2023
69ef063
Remove unused css
ektravel Apr 12, 2023
f4415be
delete gem and gulpfiles
317brian Apr 18, 2023
f6771bd
Merge pull request #3 from ektravel/docusaurus2-conversion
317brian Apr 18, 2023
ee051c3
rename files
317brian Apr 25, 2023
11caf9d
resolve merge conflicts
317brian Apr 25, 2023
21841e1
make a latest docs folder
317brian Apr 25, 2023
080e666
change md to mdx file
317brian Apr 25, 2023
214f77d
fix renamed JS files
317brian Apr 25, 2023
d789724
delete hidden section from sidebar
317brian Apr 25, 2023
879b0a2
fix link
317brian May 22, 2023
f55ed8c
delete jekyll files
317brian May 22, 2023
d541c29
rename file
317brian May 22, 2023
69392e4
add apache license
317brian May 22, 2023
d22226d
cleanup front matter of the static pages
317brian May 22, 2023
c09a2ed
fix typo
317brian May 30, 2023
88a47a9
add 26 docs
317brian May 31, 2023
c4be7ea
change version info to be read from an array
317brian May 31, 2023
026f63c
rename version widget
317brian May 31, 2023
f87e4cb
update reference to versoin widget
317brian May 31, 2023
fb16e0c
add sidebar that matches 26 and fix some markdown
317brian May 31, 2023
ee0e8e4
delete latest since it isnt needed
317brian May 31, 2023
0cac570
actual 26.0 docs and sidebar
317brian May 31, 2023
c5dae20
update comments
317brian May 31, 2023
88eee79
docusaurus v2 redirects
techdocsmith Jun 1, 2023
0754a47
break out redirects to a separate file
techdocsmith Jun 2, 2023
e20a5da
upgrade docusaurus packages
317brian Jun 2, 2023
12f5446
add vscode directory to gitignore
317brian Jun 2, 2023
e198838
fix redirects
techdocsmith Jun 2, 2023
d024d8a
fix /docs/latest redirect
techdocsmith Jun 2, 2023
90db144
Migrate redirects to Docusaurus v2 (#4)
techdocsmith Jun 2, 2023
64780d9
script that copies the md files and replaces the variable
317brian Jun 5, 2023
ccc2eb7
delete 26 files
317brian Jun 5, 2023
3eff426
fresh 26.0 without variables replaced
317brian Jun 5, 2023
842bfe0
moved copy script to its own folder
317brian Jun 5, 2023
52384c6
temp fixfor build issues
317brian Jun 5, 2023
e6bbcc3
quick temp fix sidebars
317brian Jun 5, 2023
4d112e1
move array referene to a var at the top to make updates easier
317brian Jun 6, 2023
b09b449
update copy script to copy sidebars and redirects
317brian Jun 6, 2023
3283d8a
update comment
317brian Jun 6, 2023
c9bebd1
change variable name for path and routebasepath
317brian Jun 6, 2023
5c00993
update copy script to copy to latest too if yes
317brian Jun 6, 2023
949df8d
Delete broken-link-check.py
317brian Jun 6, 2023
4983534
fix typo
317brian Jun 6, 2023
2894d31
update comments
317brian Jun 6, 2023
c3679b2
Merge branch 'docusaurus2-conversion' into oss-build-script
317brian Jun 6, 2023
9422b07
cleanup script
317brian Jun 6, 2023
b945f62
update variable
317brian Jun 6, 2023
eb25a7c
Add Python build script (#7)
vtlim Jun 6, 2023
f495465
fix paths
317brian Jun 6, 2023
49a6e42
update scripts and add a main script
vtlim Jun 6, 2023
bb99934
add an option for yarn
vtlim Jun 7, 2023
7a83a00
add pycache to gitignore
317brian Jun 7, 2023
a23d12f
update repo readme
317brian Jun 7, 2023
5f5eead
typos
317brian Jun 7, 2023
4424ee2
Merge branch 'docusaurus2-conversion' into oss-build-script
317brian Jun 7, 2023
ddd9792
Update README.md
vtlim Jun 7, 2023
debc0cc
move build scripts to a scripts directory in root
317brian Jun 7, 2023
0ecf867
delete old files
317brian Jun 7, 2023
254fe85
update gitignore
317brian Jun 7, 2023
d58ac20
fix typo
317brian Jun 7, 2023
03e8bb1
check that source_directory exists
vtlim Jun 7, 2023
24fa51f
put 25.0 html files back to lessen the files changed tab
317brian Jun 7, 2023
7ffdc25
delete __pycache__
vtlim Jun 13, 2023
1d2dd0c
pull from source "redirects.js"
vtlim Jun 13, 2023
c230a9c
move pre-docusaurus2 HTML files to published_versions
317brian Jul 11, 2023
b67ed24
update gitignore
317brian Jul 12, 2023
0015f4e
update scripts and readme for published_versions
317brian Jul 12, 2023
0bc45ed
add a branch verification
vtlim Jul 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,38 @@ _site
Gemfile.lock
.DS_store
.idea
.vscode
.jekyll-metadata
node_modules
private
/css/
_staging
scripts/__pycache__/
build
published_versions/.nojekyll

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# Docusaurus cache and generated files
.docusaurus

# Docusaurus Build Directory
/build/

### Docusaurus.Node Stack ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
5 changes: 0 additions & 5 deletions Gemfile

This file was deleted.

88 changes: 68 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,82 @@
Druid Project Website
=====================
# Druid project website

https://druid.apache.org/

## Building
This repo is used to build the Apache Druid website. It is the source of truth for website pages such as the website homepage and pages like Community.

The site requires [Node](https://nodejs.org/en/) 10.24.1 - ensure that you use this version of node. For example, if you're using [nvm](https://github.com/nvm-sh/nvm):
A different repo houses the source of truth for the following:
* Markdown files for `docs`
* the sidebar file, and
* the redirects file.

```
nvm install 10
nvm use 10
```
For those, see [`apache/druid`](https://github.com/apache/druid/).

Setup (you only need to do this once):
The target repo for the website when you're ready to publish is [`druid-website`](https://github.com/apache/druid-website).

```
npm install
bundle install
```
## Building the site for Druid 26 and later

Every time you want to run the site:
By default, the repo always starts/builds latest if you run `npm start|build` or `yarn start|build`. This way, you can always view the site locally.

```
gulp
npm start
```
The build scripts described in [Publish the site](#publish-the-site) handles building the versioned docs for when you're ready to do a release.

## Notes
To start, you'll need to install Docusaurus 2.

Ideally we would not be checking in the `css` directory and just build it as part of the deploy process.
### Install Docusaurus 2

You need a supported version of node, such as the latest Node 18.

Run `npm install` or `yarn install` in the root of the directory.

### Publish the site

These are the steps to publish either a new release or a hotfix to an existing release. Note that you'll always need to build `latest` so that the downloads page lists the correct versions, so the script automatically builds latest for you.

> Note that the build scripts expect `apache/druid` and `apache/druid-website-src` to be peers at the same directory level.

1. Update the version list in `static/js/version.js`. The highest release version goes in position 0. This file is used by `RecentReleasesWidget` on the home page to display the 3 most recent versions and to interpolate the download links on the download page.

2. From the root of `druid-website-src`, go to `scripts/`.

3. In `copy_druid_docs.py`, set `source_directory` to your OSS Druid repo. Make sure you're on the correct branch in your Druid repo before continuing.

4. In `scripts`, run `python do_all_things.py -v VERSION`. The script assumes you used `npm` to install. See example 3 if you use `yarn`.

**Example 1**: `python do_all_things.py -v 26.0.0`. This command builds version 26.0.0 of the docs and latest.

**Example 2**: If you already have Docusaurus 2 installed, skip the installation by specifying the flag `--skip-install`. For example, `python do_all_things.py -v 26.0.0 --skip-install`

**Example 3**: If you want to use yarn instead of npm, specify the flag `--yarn`. For example, `python do_all_things.py -v 26.0.0 --skip-install --yarn`

For more information about the scripts, see [the scripts](#the-scripts).

5. Find the build output in `druid-website-src/build`. If you go to `build/docs`, you should see the latest and the version you specified. These are the files for the built site. If you run it locally, such as with `http-server` you'll get the latest version of the site, such as `localhost:8080/docs/latest/` and the version you built, such as `localhost:8080/docs/26.0.0/`.

6. Make a PR to `https://github.com/apache/druid-website` with the contents of `published_versions`.

### The scripts

The `do_all_things.py` script is a wrapper for the following scripts:

- Uses `copy_druid_docs.py` to copy the markdown files for the docs over and inserts the actual Druid version for the variable {{DRUIDVERSION}}. It copies the Markdown files to `docs/VERSION`. If the version is going to be the highest version available, it'll also copy to `docs/latest`.

- Uses `build_docs.py` to build the version you want and latest. You always need to build latest to update the downloads page and the widgets on the home page. It also handles writing the redirects to create the versioned redirects for (`/docs/VERSION/`).

Once `do_all_things.py` builds the version you want and latest, it copies the build output to `published_versions`. You can use this directory to republish the whole site.

`published_versions` houses the following:

- The old CSS needed to properly render Docusaurus 1 pages
- The website pages, like Community
- All the built HTML pages for the docs, including pre-Docusaurus 2 HTML pages

## Building the site before Druid 26

The HTML files for pre-Docusaurus 2 versions (versions before 26) are in .published_versions/docs. If you need to publish updated versions of those files for any reason, you need to build the docs with Docusaurus 1 in the `apache/druid` repo:

1. Checkout the branch you want to build, such as `25.0.0`.
2. In `apache/druid/website`, run `npm run build` or `yarn build`.
3. Copy the HTML files for the docs from the build output to `published_versions/docs/VERSION`.
4. Publish the site as you normally would for a new release.

## Contributing

Expand Down
73 changes: 0 additions & 73 deletions _config.yml

This file was deleted.

24 changes: 0 additions & 24 deletions _data/events.yml

This file was deleted.

Loading