Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow custom titles in index pages #1002

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dcshzj
Copy link
Contributor

@dcshzj dcshzj commented Jan 20, 2025

Problem

The generated index pages do not follow the title of the folder resource, which results in the need to have custom index pages.

Solution

Breaking Changes

  • Yes - this PR contains breaking changes
  • No - this PR is backwards compatible

Bug Fixes:

  • Take the title of the folder resource as the page title when auto-generating the index page.
    • This also allows the site editor to customise the casing of the title without the need to create a custom index page.

Before & After Screenshots

Custom title (permalink: about-us, title: About USSS)
image

Custom index page (permalink: csa, title: Index)
image

Tests

  • Create a new folder in Studio with a custom title (using random casing) and a permalink with alphabets that are different from the title.
  • Create a new page inside this new folder and publish it.
  • Verify on the built staging site that the folder that you created shows the custom title that you input earlier.

@dcshzj dcshzj requested a review from a team as a code owner January 20, 2025 13:47
@datadog-opengovsg
Copy link

datadog-opengovsg bot commented Jan 20, 2025

Datadog Report

Branch report: fix/index-custom-title
Commit report: 9189f3a
Test service: isomer-studio

✅ 0 Failed, 257 Passed, 36 Skipped, 50.37s Total Time
➡️ Test Sessions change in coverage: 1 no change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants