📘 Create JavaDocs & Host with GitHub Pages 6/29

✅ Step 1: Generate JavaDocs

Open your Team GitHub project:

Update the code with comment tag

Example: JavaDoc

Sample Code

🧠 Option 1: Generate JavaDocs Using IntelliJ IDEA
  1. Open your project in IntelliJ IDEA.
  2. Go to Tools → Generate JavaDoc....
  3. In the popup dialog:
    • Output directory: Choose a folder like docs/.
    • Scope: Select entire project or specific packages.
    • Ensure JavaDoc executable is correctly set (e.g. javadoc).
  4. Optional: Check options like -author, -version, etc.
  5. Click OK to generate.
  6. Open docs/index.html in a browser to view the documentation.
🧠 Option 2: Generate JavaDocs Using Terminal

Open your terminal and run:

javadoc -d docs -sourcepath src -subpackages your.package.name

Example:

javadoc -d docs -sourcepath src -subpackages com.example.myapp

Explanation:

  • -d docs: Output folder for the documentation.
  • -sourcepath src: Path to your source files.
  • -subpackages: Recursively documents all sub-packages.

After generating, open docs/index.html to view the docs in your browser.

✅ Step 3: Enable GitHub Pages
  1. Go to your repo on GitHub.
  2. Click on Settings → Pages.
  3. Under Source, select:
    • Branch: main
    • Folder: /docs
  4. Click Save.

Your JavaDocs will be live at:

https://your-username.github.io/your-repo-name/

Example: https://shivasharma.github.io/IS247JavaDocs/javadocs/Main.html

📤 Step 6: How to Submit on Blackboard?

  1. Break down all the requirements into stories on the GitHub project.
  2. Push the code to GitHub with solutions.
  3. Write about the use of Java docs in the README.md file.
  4. Submit your GitHub code URL, and Github pages url.