Skip to content

Commit

Permalink
add trailing slash to community page generation to avoid 301 redirect…
Browse files Browse the repository at this point in the history
… by default
  • Loading branch information
hybridherbst committed Feb 6, 2025
1 parent f62246b commit 0a92aaf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions documentation/.vuepress/plugins/generate-shared-code/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const generateContributionPages = async (app, config) => {
contributionPage += `<contribution-header
url="${entry.profileUrl}"
author="${author}"
page="${baseUrl}${baseContributionUrl}/${cleanLink(author)}"
page="${baseUrl}${baseContributionUrl}/${cleanLink(author)}/"
profileImage="${entry.profileImage}"
githubUrl="${cont.url}"
title="${cont.title}"
Expand All @@ -100,28 +100,28 @@ const generateContributionPages = async (app, config) => {
contributionPage += "\n\n";
const pageName = cleanLink(cont.title);
app.pages.push(await createPage(app, {
path: authorPage + "/" + pageName,
path: authorPage + "/" + pageName + "/",
content: contributionPage,
}));

// Create author page content
authorPageContent += `<contribution-preview
title="${cont.title}"
pageUrl="${baseUrl}${authorPage}/${pageName}"
pageUrl="${baseUrl}${authorPage}/${pageName}/"
>\n\n`;
authorPageContent += cont.body;
authorPageContent += `\n\n</contribution-preview>\n\n`;

// Add to overview
indexContent += `<contribution-listentry
title="${cont.title}"
url="${baseUrl}${authorPage}/${pageName}"
url="${baseUrl}${authorPage}/${pageName}/"
></contribution-listentry>\n\n`;
}

authorPageContent += `\n</contributions-author>\n\n`;
app.pages.push(await createPage(app, {
path: authorPage,
path: authorPage + "/",
content: authorPageContent,
}))

Expand Down

0 comments on commit 0a92aaf

Please sign in to comment.