Site: https://netbeans.apache.org/

Source: https://github.com/apache/incubator-netbeans-website

Build / Bake and Run

  1. git clone https://github.com/apache/incubator-netbeans-website.git

  2. 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.

  3. 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

  1. Go to src/content/templates – how we keep from reiterating headers, footers, etc.

  2. 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.

  1. Fork the GitHub source repository (above) into your own account.
  2. Create a local clone of the repository - git clone https://github.com/<your-id>/incubator-netbeans-website.git
  3. 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
  4. cd into incubator-netbeans-website-live and run git 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)
  5. Make necessary changes to the website contents, found in incubator-netbeans-website/netbeans.apache.org/src/content
  6. In the incubator-netbeans-website folder, cd into netbeans.apache.org and run:

    ./gradlew clean
    ./gradlew preprocessContent --rerun-tasks
    ./gradlew bake

  7. If necessary use the .gradlew run task (as above) to preview changes.
  8. Delete the contents of incubator-netbeans-website-live/content

  9. Copy all the files from incubator-netbeans-website/build/bake to incubator-netbeans-website-live/content Do a git status to make sure only the files you expect to have changed.
  10. Test the site by running from NetBeans HTML project.
  11. Git commit your changes to incubator-netbeans-website, push to your fork master branch, and open a pull request against the upstream master branch.
  12. 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.


  • No labels