project Websites / Gitlab Issue Listing Script avatar

websites/Gitlab-Issue-Listing-Script#23: Add config option to define custom scripts and stylesheets



Issue Information

Issue Type: issue
Status: closed
Reported By: btasker

Milestone: v0.4
Created: 18-Apr-22 17:00



Description

Currently, it's possible to add custom scripts/stylesheets to the head of every page by updating head-includes.php

Whilst it's possible to export an overridden version into the docker container, doing that would mean that any upstream changes will get missed during updates.

So, it'd be good if we could add a config section to define scripts and stylesheets to include



Toggle State Changes

Activity


I've added the following to the config file

    /* Urls specified here will be embedded into the head of pages
     * 
     */
    public $include_head = array(
            "scripts" => array(),
            "stylesheets" => array()        
    );

URLs embedded within the arrays will be added using the appropriate anchor.

Scripts will need to use onDomReady or similar as this doesn't provide a way to embed inline javascript (not sure I feel comfortable enabling that).

verified

mentioned in commit e32d8384287ea9a1f83a6210b71340b8fb39745c

Commit: e32d8384287ea9a1f83a6210b71340b8fb39745c 
Author: B Tasker                            
                            
Date: 2022-04-18T18:09:19.000+01:00 

Message

Implement ability to provide the URL of javascript or stylesheets to embed via config option (websites/Gitlab-Issue-Listing-Script#23)

+30 -1 (31 lines changed)