Skip to content

Commit

Permalink
Migrate docs to MarkBind
Browse files Browse the repository at this point in the history
Let's migrate the docs site from Jekyll to MarkBind.

Primary author: @tlylt in se-edu/addressbook-level3/pull/156
Further tweaks: @damithc in se-edu/addressbook-level3/pull/206
  • Loading branch information
damithc authored and lihongguang00 committed Oct 14, 2023
1 parent 5be4fba commit 16711ba
Show file tree
Hide file tree
Showing 63 changed files with 9,138 additions and 1,378 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: MarkBind Action

on:
push:
branches:
- master

jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Install Graphviz
run: sudo apt-get install graphviz
- name: Install Java
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Build & Deploy MarkBind site
uses: MarkBind/markbind-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
rootDirectory: './docs'
baseUrl: '/addressbook-level3' # replace with your repo name
version: '^5.1.0'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ src/test/data/sandbox/
# MacOS custom attributes files created by Finder
.DS_Store
docs/_site/
docs/_markbind/logs/
23 changes: 23 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
_markbind/logs/

# Dependency directories
node_modules/

# Production build files (change if you output the build to a different directory)
_site/

# Env
.env
.env.local

# IDE configs
.vscode/
.idea/*
*.iml
6 changes: 4 additions & 2 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
layout: page
title: About Us
layout: default.md
title: "About Us"
---

# About Us

We are a team based in the [School of Computing, National University of Singapore](http://www.comp.nus.edu.sg).

This project was done by a team of 4 members.
Expand Down
6 changes: 4 additions & 2 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
layout: page
title: Configuration guide
layout: default.md
title: "Configuration guide"
---

# Configuration guide

Certain properties of the application can be controlled (e.g user preferences file location, logging level) through the configuration file (default: `config.json`).
13 changes: 8 additions & 5 deletions docs/DevOps.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
layout: page
title: DevOps guide
layout: default.md
title: "DevOps guide"
pageNav: 3
---

* Table of Contents
{:toc}
# DevOps guide

--------------------------------------------------------------------------------------------------------------------
<!-- * Table of Contents -->
<page-nav-print />

<!-- -------------------------------------------------------------------------------------------------------------------- -->

## Build automation

Expand Down
114 changes: 64 additions & 50 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

28 changes: 10 additions & 18 deletions docs/Documentation.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
---
layout: page
title: Documentation guide
layout: default.md
title: "Documentation guide"
pageNav: 3
---

**Setting up and maintaining the project website:**

* We use [**Jekyll**](https://jekyllrb.com/) to manage documentation.
* The `docs/` folder is used for documentation.
* To learn how set it up and maintain the project website, follow the guide [_[se-edu/guides] **Using Jekyll for project documentation**_](https://se-education.org/guides/tutorials/jekyll.html).
* Note these points when adapting the documentation to a different project/product:
* The 'Site-wide settings' section of the page linked above has information on how to update site-wide elements such as the top navigation bar.
* :bulb: In addition to updating content files, you might have to update the config files `docs\_config.yml` and `docs\_sass\minima\_base.scss` (which contains a reference to `AB-3` that comes into play when converting documentation pages to PDF format).
* If you are using Intellij for editing documentation files, you can consider enabling 'soft wrapping' for `*.md` files, as explained in [_[se-edu/guides] **Intellij IDEA: Useful settings**_](https://se-education.org/guides/tutorials/intellijUsefulSettings.html#enabling-soft-wrapping)
# Documentation Guide

* We use [**MarkBind**](https://markbind.org/) to manage documentation.
* The `docs/` folder contains the source files for the documentation website.
* To learn how set it up and maintain the project website, follow the guide [[se-edu/guides] Working with Forked MarkBind sites](https://se-education.org/guides/tutorials/markbind-forked-sites.html) for project documentation.

**Style guidance:**

* Follow the [**_Google developer documentation style guide_**](https://developers.google.com/style).
* Also relevant is the [_se-edu/guides **Markdown coding standard**_](https://se-education.org/guides/conventions/markdown.html).

* Also relevant is the [_[se-edu/guides] **Markdown coding standard**_](https://se-education.org/guides/conventions/markdown.html)

**Diagrams:**

* See the [_[se-edu/guides] **Using PlantUML**_](https://se-education.org/guides/tutorials/plantUml.html)

**Converting a document to the PDF format:**
**Converting to PDF**

* See the guide [_[se-edu/guides] **Saving web documents as PDF files**_](https://se-education.org/guides/tutorials/savingPdf.html)
* See the guide [_se-edu/guides **Saving web documents as PDF files**_](https://se-education.org/guides/tutorials/savingPdf.html).
10 changes: 0 additions & 10 deletions docs/Gemfile

This file was deleted.

6 changes: 4 additions & 2 deletions docs/Logging.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
---
layout: page
title: Logging guide
layout: default.md
title: "Logging guide"
---

# Logging guide

* We are using `java.util.logging` package for logging.
* The `LogsCenter` class is used to manage the logging levels and logging destinations.
* The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level.
Expand Down
26 changes: 16 additions & 10 deletions docs/SettingUp.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
---
layout: page
title: Setting up and getting started
layout: default.md
title: "Setting up and getting started"
pageNav: 3
---

* Table of Contents
{:toc}
# Setting up and getting started

<!-- * Table of Contents -->
<page-nav-print />

--------------------------------------------------------------------------------------------------------------------

## Setting up the project in your computer

<div markdown="span" class="alert alert-warning">:exclamation: **Caution:**
<box type="warning" seamless>

**Caution:**
Follow the steps in the following guide precisely. Things will not work out if you deviate in some steps.
</div>
</box>

First, **fork** this repo, and **clone** the fork into your computer.

If you plan to use Intellij IDEA (highly recommended):
1. **Configure the JDK**: Follow the guide [_[se-edu/guides] IDEA: Configuring the JDK_](https://se-education.org/guides/tutorials/intellijJdk.html) to to ensure Intellij is configured to use **JDK 11**.
1. **Import the project as a Gradle project**: Follow the guide [_[se-edu/guides] IDEA: Importing a Gradle project_](https://se-education.org/guides/tutorials/intellijImportGradleProject.html) to import the project into IDEA.<br>
:exclamation: Note: Importing a Gradle project is slightly different from importing a normal Java project.
1. **Import the project as a Gradle project**: Follow the guide [_[se-edu/guides] IDEA: Importing a Gradle project_](https://se-education.org/guides/tutorials/intellijImportGradleProject.html) to import the project into IDEA.
<box type="warning" seamless>
Note: Importing a Gradle project is slightly different from importing a normal Java project.
</box>
1. **Verify the setup**:
1. Run the `seedu.address.Main` and try a few commands.
1. [Run the tests](Testing.md) to ensure they all pass.
Expand All @@ -34,10 +39,11 @@ If you plan to use Intellij IDEA (highly recommended):

If using IDEA, follow the guide [_[se-edu/guides] IDEA: Configuring the code style_](https://se-education.org/guides/tutorials/intellijCodeStyle.html) to set up IDEA's coding style to match ours.

<div markdown="span" class="alert alert-primary">:bulb: **Tip:**
<box type="tip" seamless>

**Tip:**
Optionally, you can follow the guide [_[se-edu/guides] Using Checkstyle_](https://se-education.org/guides/tutorials/checkstyle.html) to find how to use the CheckStyle within IDEA e.g., to report problems _as_ you write code.
</div>
</box>

1. **Set up CI**

Expand Down
19 changes: 12 additions & 7 deletions docs/Testing.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
layout: page
title: Testing guide
layout: default.md
title: "Testing guide"
pageNav: 3
---

* Table of Contents
{:toc}
# Testing guide

--------------------------------------------------------------------------------------------------------------------
<!-- * Table of Contents -->
<page-nav-print />

<!-- -------------------------------------------------------------------------------------------------------------------- -->

## Running tests

Expand All @@ -19,8 +22,10 @@ There are two ways to run tests.
* **Method 2: Using Gradle**
* Open a console and run the command `gradlew clean test` (Mac/Linux: `./gradlew clean test`)

<div markdown="span" class="alert alert-secondary">:link: **Link**: Read [this Gradle Tutorial from the se-edu/guides](https://se-education.org/guides/tutorials/gradle.html) to learn more about using Gradle.
</div>
<box type="info" seamless>

**Link**: Read [this Gradle Tutorial from the se-edu/guides](https://se-education.org/guides/tutorials/gradle.html) to learn more about using Gradle.
</box>

--------------------------------------------------------------------------------------------------------------------

Expand Down
Loading

0 comments on commit 16711ba

Please sign in to comment.