Skip to main content

For developers

This section offers a detailed guide to the technical aspects and processes involved in developing and deploying the Learning Lab site, covering customisations, search functionality, redirect management, and publishing as a static site.

WordPress Overview

The Learning Lab's WordPress theme is a heavily customised version of Picostrap5, focusing on SASS compilation. All modifications are implemented in the picostrap5-child-base directory, with significant changes across various files and folders to support unique functionalities like custom templates for 404 errors and search capabilities.

Redirect

Due to the limitations of S3 hosting, which lacks advanced routing capabilities, redirects are managed using JavaScript from the 404.html page. The redirect.php file plays a crucial role in constructing a redirect array and handling unresolved paths, ensuring users are directed correctly despite hosting constraints.

Search

Search functionality is implemented using a combination of WordPress templates, JavaScript scripts, and a JSON data file. The page-search.php template, along with the fuse.js library and js/search.js, handles search operations. The site relies on pages.json for content representation, and js/search-home.js manages redirection from the homepage.

Publishing the Learning Lab

While content is managed within a WordPress environment, the publicly accessible site is a static version. The process involves exporting site content to JSON, extracting HTML using SiteSucker, and running a Python script to clean and prepare files. The static site is then uploaded to the live environment after testing and QA.


Keywords