This is the repository contains the source code for https://projects.ce.pdn.ac.lk. The site is built by Jekyll Builder and hosted on GitHub pages
Student projects on github.com/cepdnaclk can be added to this site using the python script found in the root folder. Run following instructions to run the script and make a pull request to the repository.
# Create a virtual environment and install the required dependencies
python3 -m venv .venv
source .venv/bin/activate
# Install the required dependencies and run the script
pip install requests
# Move into the python scripts folder
cd ./python_scripts/
# Re-index the repositories and update the site
python index_repositories.py
# Build and aggregate the Projects index
python dynamic_data.py
# Update the latest and popular projects sections
python projects_latest.py
python projects_popular.pyCurrently, the site is built by GitHub itself once there is a pull request to the main branch.
If you are interested in build the site in a local environment, info on how to build can be found in projects.ce.pdn.ac.lk/docs/deployment. You can also use setup.sh and run.sh bash scripts in the folder, /scripts.
The site search now uses Algolia instead of the old static Lunr JSON flow.
Configure these values before enabling the search UI or running the indexer:
ALGOLIA_APP_ID=<algolia-application-id>
ALGOLIA_SEARCH_API_KEY=<algolia-search-only-api-key>
ALGOLIA_ADMIN_API_KEY=<algolia-admin-api-key>GitHub Actions configuration:
- Add
ALGOLIA_APP_IDas a repository variable. - Add
ALGOLIA_ADMIN_API_KEYas a repository secret. - If your Pages build injects environment variables, also provide
ALGOLIA_SEARCH_API_KEY.
For the current branch-based GitHub Pages build, replace the placeholder values in _config.yml
with the public search-only values. Do not place the admin API key in the repository.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python -m unittest discover -s tests -v
cd python_scripts
python algolia_index.pyThe indexer fetches https://api.ce.pdn.ac.lk/projects/v1/all/, validates the payload, logs fetch,
transform, diff, upsert, delete, and failure stages, then syncs the configured Algolia index.
If you have any doubt about implementation or need to report a bug or a suggestion, please feel free to contact one of them.
- Prof. Roshan Ragel (roshanr@eng.pdn.ac.lk )
- Nuwan Jaliyagoda (nuwanjaliyagoda@eng.pdn.ac.lk GitHub: @NuwanJ )
- Akila Karunanayake (e17154@eng.pdn.ac.lk | GitHub: @Akilax0 )
If you are willing to contribute to improving this website, please feel free to contact Prof. Roshan Ragel (roshanr@eng.pdn.ac.lk)