Skip to content

Commit

Permalink
Use v3 subdomain for links from v3 codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Oct 1, 2024
1 parent eade9a7 commit 0142b7c
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/Eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -1403,13 +1403,13 @@ Object.assign(HtmlBasePlugin, HtmlBasePluginExtras);

const EleventyServerlessBundlerPlugin = function () {
throw new Error(
"Following feedback from our Community Survey, low interest in this plugin prompted its removal from Eleventy core in 3.0 as we refocus on static sites. Learn more: https://www.11ty.dev/docs/plugins/serverless/",
"Following feedback from our Community Survey, low interest in this plugin prompted its removal from Eleventy core in 3.0 as we refocus on static sites. Learn more: https://v3.11ty.dev/docs/plugins/serverless/",
);
};

const EleventyEdgePlugin = function () {
throw new Error(
"Following feedback from our Community Survey, low interest in this plugin prompted its removal from Eleventy core in 3.0 as we refocus on static sites. Learn more: https://www.11ty.dev/docs/plugins/edge/",
"Following feedback from our Community Survey, low interest in this plugin prompted its removal from Eleventy core in 3.0 as we refocus on static sites. Learn more: https://v3.11ty.dev/docs/plugins/edge/",
);
};

Expand Down
2 changes: 1 addition & 1 deletion src/EleventyFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ class EleventyFiles {
let fullVirtualPath = this.dirs.getInputPath(path);
if (!this.extensionMap.getKey(fullVirtualPath)) {
this.eleventyConfig.logger.warn(
`The virtual template at ${fullVirtualPath} is using a template format that’s not valid for your project. Your project is using: "${this.formats}". Read more about formats: https://www.11ty.dev/docs/config/#template-formats`,
`The virtual template at ${fullVirtualPath} is using a template format that’s not valid for your project. Your project is using: "${this.formats}". Read more about formats: https://v3.11ty.dev/docs/config/#template-formats`,
);
}
return fullVirtualPath;
Expand Down
2 changes: 1 addition & 1 deletion src/Engines/TemplateEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class TemplateEngine {
throw new Error("compile() must be implemented by engine");
}

// See https://www.11ty.dev/docs/watch-serve/#watch-javascript-dependencies
// See https://v3.11ty.dev/docs/watch-serve/#watch-javascript-dependencies
static shouldSpiderJavaScriptDependencies() {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Engines/TemplateEngineManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class TemplateEngineManager {
// Custom entries *can* overwrite default entries above
if ("extensionMap" in this.config) {
for (let entry of this.config.extensionMap) {
// either the key does not already exist or it is not a simple alias and is an override: https://www.11ty.dev/docs/languages/custom/#overriding-an-existing-template-language
// either the key does not already exist or it is not a simple alias and is an override: https://v3.11ty.dev/docs/languages/custom/#overriding-an-existing-template-language
let existingTarget = this._keyToClassNameMap[entry.key];
let isAlias = TemplateEngineManager.isAlias(entry);

Expand Down Expand Up @@ -173,7 +173,7 @@ class TemplateEngineManager {
// Warning about engine deprecation
if (this.isEngineRemovedFromCore(name)) {
throw new Error(
`Per the 11ty Community Survey (2023), the "${name}" template language was moved from core to an officially supported plugin in v3.0. These plugins live here: https://github.com/11ty/eleventy-plugin-template-languages and are documented on their respective template language docs at https://www.11ty.dev/docs/languages/ You are also empowered to implement *any* template language yourself using https://www.11ty.dev/docs/languages/custom/`,
`Per the 11ty Community Survey (2023), the "${name}" template language was moved from core to an officially supported plugin in v3.0. These plugins live here: https://github.com/11ty/eleventy-plugin-template-languages and are documented on their respective template language docs at https://v3.11ty.dev/docs/languages/ You are also empowered to implement *any* template language yourself using https://v3.11ty.dev/docs/languages/custom/`,
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/RenderPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ async function renderShortcodeFn(fn, data) {

/**
* A plugin to add shortcodes to render an Eleventy template
* string (or file) inside of another template. {@link https://www.11ty.dev/docs/plugins/render/}
* string (or file) inside of another template. {@link https://v3.11ty.dev/docs/plugins/render/}
*
* @since 1.0.0
* @param {module:11ty/eleventy/UserConfig} eleventyConfig - User-land configuration instance.
Expand Down
2 changes: 1 addition & 1 deletion src/Template.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ class Template extends TemplateContent {
e.message.endsWith("not extensible"))
) {
throw new EleventyBaseError(
`You attempted to set one of Eleventy’s reserved data property names${e.reservedNames ? `: ${e.reservedNames.join(", ")}` : ""}. You can opt-out of this behavior with \`eleventyConfig.setFreezeReservedData(false)\` or rename/remove the property in your data cascade that conflicts with Eleventy’s reserved property names (e.g. \`eleventy\`, \`pkg\`, and others). Learn more: https://www.11ty.dev/docs/data-eleventy-supplied/`,
`You attempted to set one of Eleventy’s reserved data property names${e.reservedNames ? `: ${e.reservedNames.join(", ")}` : ""}. You can opt-out of this behavior with \`eleventyConfig.setFreezeReservedData(false)\` or rename/remove the property in your data cascade that conflicts with Eleventy’s reserved property names (e.g. \`eleventy\`, \`pkg\`, and others). Learn more: https://v3.11ty.dev/docs/data-eleventy-supplied/`,
e,
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/TemplateConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ class TemplateConfig {
localConfig = configDefaultReturn;
}

// Removed a check for `filters` in 3.0.0-alpha.6 (now using addTransform instead) https://www.11ty.dev/docs/config/#transforms
// Removed a check for `filters` in 3.0.0-alpha.6 (now using addTransform instead) https://v3.11ty.dev/docs/config/#transforms
} catch (err) {
let isModuleError =
err instanceof Error && (err?.message || "").includes("Cannot find module");
Expand Down
4 changes: 2 additions & 2 deletions src/TemplateFileSlug.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class TemplateFileSlug {
this.filenameNoExt = extensionMap.removeTemplateExtension(this.parsed.base);
}

// `page.filePathStem` see https://www.11ty.dev/docs/data-eleventy-supplied/#page-variable
// `page.filePathStem` see https://v3.11ty.dev/docs/data-eleventy-supplied/#page-variable
getFullPathWithoutExtension() {
return "/" + TemplatePath.join(...this.dirs, this._getRawSlug());
}
Expand All @@ -38,7 +38,7 @@ class TemplateFileSlug {
return slug;
}

// `page.fileSlug` see https://www.11ty.dev/docs/data-eleventy-supplied/#page-variable
// `page.fileSlug` see https://v3.11ty.dev/docs/data-eleventy-supplied/#page-variable
getSlug() {
let rawSlug = this._getRawSlug();

Expand Down
12 changes: 6 additions & 6 deletions test/EleventyTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ eleventy:
elev.disableLogger();

let e = await t.throwsAsync(() => elev.toJSON(), {
message: 'You attempted to set one of Eleventy’s reserved data property names. You can opt-out of this behavior with `eleventyConfig.setFreezeReservedData(false)` or rename/remove the property in your data cascade that conflicts with Eleventy’s reserved property names (e.g. `eleventy`, `pkg`, and others). Learn more: https://www.11ty.dev/docs/data-eleventy-supplied/'
message: 'You attempted to set one of Eleventy’s reserved data property names. You can opt-out of this behavior with `eleventyConfig.setFreezeReservedData(false)` or rename/remove the property in your data cascade that conflicts with Eleventy’s reserved property names (e.g. `eleventy`, `pkg`, and others). Learn more: https://v3.11ty.dev/docs/data-eleventy-supplied/'
});

t.is(e.originalError.toString(), "TypeError: Cannot add property key1, object is not extensible");
Expand All @@ -1015,7 +1015,7 @@ pkg:
elev.disableLogger();

let e = await t.throwsAsync(() => elev.toJSON(), {
message: 'You attempted to set one of Eleventy’s reserved data property names. You can opt-out of this behavior with `eleventyConfig.setFreezeReservedData(false)` or rename/remove the property in your data cascade that conflicts with Eleventy’s reserved property names (e.g. `eleventy`, `pkg`, and others). Learn more: https://www.11ty.dev/docs/data-eleventy-supplied/'
message: 'You attempted to set one of Eleventy’s reserved data property names. You can opt-out of this behavior with `eleventyConfig.setFreezeReservedData(false)` or rename/remove the property in your data cascade that conflicts with Eleventy’s reserved property names (e.g. `eleventy`, `pkg`, and others). Learn more: https://v3.11ty.dev/docs/data-eleventy-supplied/'
});

t.is(e.originalError.toString(), "TypeError: Cannot add property myOwn, object is not extensible");
Expand Down Expand Up @@ -1053,7 +1053,7 @@ page: "My page value"
elev.disableLogger();

let e = await t.throwsAsync(() => elev.toJSON(), {
message: 'You attempted to set one of Eleventy’s reserved data property names: page. You can opt-out of this behavior with `eleventyConfig.setFreezeReservedData(false)` or rename/remove the property in your data cascade that conflicts with Eleventy’s reserved property names (e.g. `eleventy`, `pkg`, and others). Learn more: https://www.11ty.dev/docs/data-eleventy-supplied/'
message: 'You attempted to set one of Eleventy’s reserved data property names: page. You can opt-out of this behavior with `eleventyConfig.setFreezeReservedData(false)` or rename/remove the property in your data cascade that conflicts with Eleventy’s reserved property names (e.g. `eleventy`, `pkg`, and others). Learn more: https://v3.11ty.dev/docs/data-eleventy-supplied/'
});

t.is(e.originalError.toString(), "TypeError: Cannot override reserved Eleventy properties: page");
Expand All @@ -1070,7 +1070,7 @@ content: "My page value"
elev.disableLogger();

let e = await t.throwsAsync(() => elev.toJSON(), {
message: 'You attempted to set one of Eleventy’s reserved data property names: content. You can opt-out of this behavior with `eleventyConfig.setFreezeReservedData(false)` or rename/remove the property in your data cascade that conflicts with Eleventy’s reserved property names (e.g. `eleventy`, `pkg`, and others). Learn more: https://www.11ty.dev/docs/data-eleventy-supplied/'
message: 'You attempted to set one of Eleventy’s reserved data property names: content. You can opt-out of this behavior with `eleventyConfig.setFreezeReservedData(false)` or rename/remove the property in your data cascade that conflicts with Eleventy’s reserved property names (e.g. `eleventy`, `pkg`, and others). Learn more: https://v3.11ty.dev/docs/data-eleventy-supplied/'
});

t.is(e.originalError.toString(), "TypeError: Cannot override reserved Eleventy properties: content");
Expand All @@ -1087,7 +1087,7 @@ collections: []
elev.disableLogger();

let e = await t.throwsAsync(() => elev.toJSON(), {
message: 'You attempted to set one of Eleventy’s reserved data property names: collections. You can opt-out of this behavior with `eleventyConfig.setFreezeReservedData(false)` or rename/remove the property in your data cascade that conflicts with Eleventy’s reserved property names (e.g. `eleventy`, `pkg`, and others). Learn more: https://www.11ty.dev/docs/data-eleventy-supplied/'
message: 'You attempted to set one of Eleventy’s reserved data property names: collections. You can opt-out of this behavior with `eleventyConfig.setFreezeReservedData(false)` or rename/remove the property in your data cascade that conflicts with Eleventy’s reserved property names (e.g. `eleventy`, `pkg`, and others). Learn more: https://v3.11ty.dev/docs/data-eleventy-supplied/'
});

t.is(e.originalError.toString(), "TypeError: Cannot override reserved Eleventy properties: collections");
Expand Down Expand Up @@ -1175,7 +1175,7 @@ parkour:
t.is(elev.eleventyConfig.config.keys.package, "parkour");

let e = await t.throwsAsync(() => elev.toJSON(), {
message: 'You attempted to set one of Eleventy’s reserved data property names. You can opt-out of this behavior with `eleventyConfig.setFreezeReservedData(false)` or rename/remove the property in your data cascade that conflicts with Eleventy’s reserved property names (e.g. `eleventy`, `pkg`, and others). Learn more: https://www.11ty.dev/docs/data-eleventy-supplied/'
message: 'You attempted to set one of Eleventy’s reserved data property names. You can opt-out of this behavior with `eleventyConfig.setFreezeReservedData(false)` or rename/remove the property in your data cascade that conflicts with Eleventy’s reserved property names (e.g. `eleventy`, `pkg`, and others). Learn more: https://v3.11ty.dev/docs/data-eleventy-supplied/'
});

t.is(e.originalError.toString(), "TypeError: Cannot add property myOwn, object is not extensible");
Expand Down
12 changes: 6 additions & 6 deletions test/TemplatePermalinkTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ test("Permalink generate apache content negotiation #761", (t) => {
},
]);
t.is(tp1.toHref(), "/");
// best paired with https://www.11ty.dev/docs/data-eleventy-supplied/#filepathstem for index.es.html
// best paired with https://v3.11ty.dev/docs/data-eleventy-supplied/#filepathstem for index.es.html
t.is(tp1.toOutputPath(), "index.es/index.html");
});

Expand All @@ -197,7 +197,7 @@ test("Permalink generate apache content negotiation with subdirectory #761", (t)
]);

t.is(tp1.toHref(), "/test/");
// best paired with https://www.11ty.dev/docs/data-eleventy-supplied/#filepathstem for test/index.es.html
// best paired with https://v3.11ty.dev/docs/data-eleventy-supplied/#filepathstem for test/index.es.html
t.is(tp1.toOutputPath(), "test/index.es/index.html");
});

Expand All @@ -220,7 +220,7 @@ test("Permalink generate with urlTransforms #761", (t) => {
]);

t.is(tp.toHref(), "/permalinksubfolder/");
// best paired with https://www.11ty.dev/docs/data-eleventy-supplied/#filepathstem for permalinksubfolder/index.es.html
// best paired with https://v3.11ty.dev/docs/data-eleventy-supplied/#filepathstem for permalinksubfolder/index.es.html
t.is(tp.toOutputPath(), "permalinksubfolder/index.es/index.html");
});

Expand All @@ -235,7 +235,7 @@ test("Permalink generate with urlTransforms (skip via undefined) #761", (t) => {
]);

t.is(tp.toHref(), "/permalinksubfolder/index.es/");
// best paired with https://www.11ty.dev/docs/data-eleventy-supplied/#filepathstem for permalinksubfolder/index.es.html
// best paired with https://v3.11ty.dev/docs/data-eleventy-supplied/#filepathstem for permalinksubfolder/index.es.html
t.is(tp.toOutputPath(), "permalinksubfolder/index.es/index.html");
});

Expand All @@ -252,7 +252,7 @@ test("Permalink generate with 2 urlTransforms #761", (t) => {
]);

t.is(tp.toHref(), "/def/");
// best paired with https://www.11ty.dev/docs/data-eleventy-supplied/#filepathstem for permalinksubfolder/index.es.html
// best paired with https://v3.11ty.dev/docs/data-eleventy-supplied/#filepathstem for permalinksubfolder/index.es.html
t.is(tp.toOutputPath(), "permalinksubfolder/index.es/index.html");
});

Expand All @@ -266,7 +266,7 @@ test("Permalink generate with urlTransforms returns index.html #761", (t) => {
]);

t.is(tp.toHref(), "/abc/");
// best paired with https://www.11ty.dev/docs/data-eleventy-supplied/#filepathstem for permalinksubfolder/index.es.html
// best paired with https://v3.11ty.dev/docs/data-eleventy-supplied/#filepathstem for permalinksubfolder/index.es.html
t.is(tp.toOutputPath(), "permalinksubfolder/index.es/index.html");
});

Expand Down

0 comments on commit 0142b7c

Please sign in to comment.