This website holds the complete software and design process documentation for prjects done by mora-bprs team.
-
Install Hugo to your respective platform - official Hugo website.
-
Git Clone with submodules and navigate
git clone --recurse-submodules https://github.com/mora-bprs/mora-bprs.github.io.git && cd mora-bprs.github.io # or gh repo clone mora-bprs/mora-bprs.github.io -- --recurse-submodules && cd mora-bprs.github.io
-
Create a git branch if you haven't already
git checkout -b <newbranchname> # example: git checkout -b thuva # if you already have a recommended branch to work on just checkout git checkout <branchname>
-
Make changes and Push
- edit files inside
docs/
directory referring hugo theme documentation - verify your changes in the site using the following command, locally hosted in
localhost:1313
hugo server -D
- upload your changes to repo when you are confident and make a pull request
git add . git commit -m "Description of changes made" git push origin <remotebranchname>
- some tips: if you are still editing the file and don't want it to show up on the site set draft = true in the header of the md file.
- edit files inside
- This guide assumes that you have previous experience with handling banches and private repos, if you want a more beginner friendly approach use the github commandline utility
gh
which will setup all the authetications and remote url handling for you. - We are using the
hextra
template for our documentation site. And choosing the git submodule route to install the theme. - Follow the steps to get the site working first and then add the content.
-
Install Hugo
- Hugo is a fast Static Site generator written in golang, hence you have to install it to compile your templates to web format.
- You can follow the installation instructions provided on the official Hugo website.
-
Clone the Repository with submodules and Navigate to the Directory
git clone --recurse-submodules https://github.com/mora-bprs/mora-bprs.github.io.git && cd mora-bprs.github.io
-
Start Editing the Site:
- Refer to this hugo theme documentation to edit the pages.
- You can start editing the Hugo site by modifying the content files located in the
content
directory. They can use Markdown syntax to write content and make changes as needed. - First create a folder with the slug name in the content folder, then create an index.md file in that folder and write the content in it.
hugo server -D
will give a preview of your site inlocalhost:1313
template for index.md file:
---
title: "Title of the page"
date: 2024-03-03
authors:
- name: imfing
link: https://go.io
tags:
- Markdown
- Example
- Guide
draft: false
---
## Sample Markdown content
Here write the content of the page in markdown syntax.
-
Preview Changes Locally:
- To preview their changes locally, you can run the Hugo development server:
hugo server -D #or hugo server --buildDrafts --disableFastRender
This command starts a local web server, and you can view the site in their web browser at
http://localhost:1313
. -
Generate the changes locally:
- To generate the changes locally, you can run the Hugo command:
hugo --destination docs
This command generates the static files in the
docs
directory. -
Commit Changes to the respective Branch:
-
Create a new branch when you run this for the first time.
git checkout -b <newbranchname> # example: git checkout -b thuva
-
If this is not your first time working with
dev
branch do the following. -
After making changes, you should commit their changes to the "dev" branch:
-
When multiple people are working it is recommended to create a branch using your name or something unique to your team and commit to that branch to avoid merge conflicts and remote HEAD conflicts.
- Sasika: dev branch
- Thuva: thuva branch
git checkout <branchname> git add . git commit -m "Description of changes made" git push origin <remotebranchname>
-
-
Updating Submodules
git submodule update --remote
- Using Hugo Theme [https://github.com/imfing/hextra]