expressjs / expressjs/serve-index

The `directory.html` template should be added in `locals`

Open
#95 3 comments 0 reactions 0 assignees View on GitHub
awaiting more info
Dominant language
JavaScript
Stars
447
Forks
157
PR merge metrics
No merged PRs in 30d

Description

In case someone wants to add extra content (e.g. an additional script ) in the existing template, it would be good to be able to do it also from inside template function (instead of copying/editing the default template). To achieve this, the default template should be added in `locals` object passed to template function.

The advantage of this is that on a later package upgrade, the template will be always up-to-date with the authors' version (plus the edits).

Contributor guide

Open the contributing guide

Research direction

Locate the directory.html template and the template function that receives the locals object. Read how the default template is currently selected and determine how it can be exposed through locals without losing the package's default behavior. Done means callers can extend the default template from inside the template function while upgrades continue to provide the authors' current version.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.