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

chore: add trailing slash to pathPrefix #15993

Merged
merged 1 commit into from Jun 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/.eleventy.js
Expand Up @@ -30,12 +30,12 @@ module.exports = function(eleventyConfig) {
* see changes before deployed.
*/

let pathPrefix = "/docs/head";
let pathPrefix = "/docs/head/";

if (process.env.CONTEXT === "deploy-preview") {
pathPrefix = "";
pathPrefix = "/";
} else if (process.env.BRANCH === "latest") {
pathPrefix = "/docs/latest";
pathPrefix = "/docs/latest/";
}

eleventyConfig.addGlobalData("GIT_BRANCH", process.env.BRANCH);
Expand Down Expand Up @@ -212,7 +212,7 @@ module.exports = function(eleventyConfig) {

rules.forEach(rule => {
const listItem = `<li class="related-rules__list__item">
<a href="${pathPrefix}/rules/${rule}">
<a href="${pathPrefix}rules/${rule}">
<span>${rule}</span>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" aria-hidden="true" focusable="false">
<path d="M5 12H19M19 12L12 5M19 12L12 19" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
Expand Down