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

change file naming strategy #7415

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

change file naming strategy #7415

wants to merge 3 commits into from

Conversation

JustinBeckwith
Copy link
Contributor

@JustinBeckwith JustinBeckwith commented Mar 3, 2025

This moves us away from capital letters and underscores in files, and towards lower case and dashes. The corresponding dev portal PR also stops trying to infer the title of the doc from the filename, and instead uses the title metadata or H1 contents.

@JustinBeckwith JustinBeckwith requested a review from a team as a code owner March 3, 2025 17:57
@JustinBeckwith JustinBeckwith requested review from colinloretz and removed request for a team March 3, 2025 17:57
@@ -106,7 +106,7 @@ const validLinks = new Map<string, string[]>([
// Gather valid links
const changelogAnchors = [];
for (const [name, raw] of docFiles) {
const keyName = `DOCS${name.replaceAll("/", "_").toUpperCase()}`;
const keyName = `DOCS${name.replaceAll("/", "_").replaceAll("-", "_").toUpperCase()}`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const keyName = `DOCS${name.replaceAll("/", "_").replaceAll("-", "_").toUpperCase()}`;
const keyName = `DOCS${name.replaceAll(/[/-]/g ,"_").toUpperCase()}`;

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