How this works?
We have created a few HTML page templates (you can see them from here) based on the templating language known as Liquid Syntax:
- Home page
- Course page
- Batch page
- Project page
Students will use a naming convention (this way) to name their projects in the Department's GitHub organization, cepdnaclk.
We have written a Python Script to call the GitHub REST APIs, and it will fetch the details of the public repositories in the organization. Then the script will filter and categorize the projects under courses or specific academic projects, and save them as MD files with YML header, containing the details about each and every project.
This Python script will be executed by this GitHub Action, which will be triggered daily (optionally, we can trigger it manually from here). Then the Python script will create files for each project in the repository, and at the end of the GitHub Action, the changes will be committed into the projects.ce.pdn.ac.lk repository.
Once the content was committed, Github will build the GitHub Pages site using the Page Build action. It will convert the data into HTML files based on the templates previously defined. The Liquid syntax will do some pre-processing of the data. At the end of that, the site can be accessed through GitHub Pages, from the link, https://cepdnaclk.github.io/projects.ce.pdn.ac.lk.
We have assigned a CNAME record for that path, so you can visit the GitHub pages site through the subdomain, projects.ce.pdn.ac.lk.