Site: https://netbeans.apache.org/
Source: https://github.com/apache/incubator-netbeans-website
Build / Bake and Run
git clone https://github.com/apache/incubator-netbeans-website.git
- cd into 'incubator-netbeans-website/netbeans.apache.org' and run:
./gradlew preprocessContent --rerun-tasks
./gradlew bake
Note: No need to separately install Gradle, it is included in the repository.
Note: There is an issue with the current Sass build tasks that may result in missing CSS files unless --rerun-tasks is used - this is being looked at. - After the above succeeds, run:
./gradlew run
Then go to http://localhost:8080 and you'll see the site you have built from the source.
Contributing
You may fork the repository, perform changes and submit a pull request
Exploring
- Go to src/content/templates – how we keep from reiterating headers, footers, etc.
- Run ./gradlew preprocessContent bake and look in 'build/generated-bake' (pre-processed files) and 'build/bake' (final result).
Updating the live website
Changes to the master branch of the website repository will now automatically trigger a build and deploy. The steps below are no longer necessary, although kept as a reference to the process involved.
Work is under way to automatically update the website based on commits to master. These are temporary instructions on how to update the website manually until that is ready.
The live website corresponds to the contents of the /content
folder in the asf-site
branch of the repository. Therefore, the build output from JBake needs to be put into this folder.
- Fork the GitHub source repository (above) into your own account.
- Create a local clone of the repository -
git clone https://github.com/<your-id>/incubator-netbeans-website.git
- Create a second clone of the repository into another folder - eg.
git clone https://github.com/<your-id>/incubator-netbeans-website.git incubator-netbeans-website-live
cd
intoincubator-netbeans-website-live
and rungit checkout asf-site
(this branch is set up as a NetBeans HTML project so you can open and test the copied files in the IDE)- Make necessary changes to the website contents, found in
incubator-netbeans-website/netbeans.apache.org/src/content
- In the
incubator-netbeans-website
folder,cd
intonetbeans.apache.org
and run:./gradlew clean
./gradlew preprocessContent --rerun-tasks
./gradlew bake - If necessary use the
.gradlew run
task (as above) to preview changes. Delete the contents of
incubator-netbeans-website-live/content
- Copy all the files from
incubator-netbeans-website/build/bake
toincubator-netbeans-website-live/content
Do agit status
to make sure only the files you expect to have changed. - Test the site by running from NetBeans HTML project.
- Git commit your changes to incubator-netbeans-website, push to your fork master branch, and open a pull request against the upstream master branch.
- Git commit your changes to incubator-netbeans-website-live, push to your fork asf-site branch, and open a pull request against the upstream asf-site branch, making sure to include a reference to the master branch PR.
Add the Apache upstream as a second remote to both clones (eg. run git remote add upstream https://github.com/apache/incubator-netbeans-website.git)
. Make sure to pull from upstream master and asf-site before making future changes.