Added dedicated virtual template for releases.
This commit is contained in:
parent
c2c676ce19
commit
05fd995edd
7 changed files with 70 additions and 35 deletions
|
|
@ -7,6 +7,7 @@ import 'dotenv/config';
|
|||
let allPlugins = [];
|
||||
const isProd = process.env.ELEVENTY_ENV === "production";
|
||||
const pathPrefix = isProd ? "/neoBeta/" : "/";
|
||||
const buildTime = new Date(Date.now()).toISOString();
|
||||
|
||||
export default function (eleventyConfig) {
|
||||
eleventyConfig.addNunjucksAsyncFilter("githubReleases", async function(owner, repo, callback) {
|
||||
|
|
@ -31,8 +32,7 @@ export default function (eleventyConfig) {
|
|||
callback(null, []);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
eleventyConfig.setInputDirectory("src");
|
||||
eleventyConfig.setOutputDirectory("public");
|
||||
eleventyConfig.addPassthroughCopy("src/projects/**/*.png");
|
||||
|
|
@ -43,13 +43,14 @@ export default function (eleventyConfig) {
|
|||
eleventyConfig.addPassthroughCopy("src/authors/**/*.jpeg");
|
||||
eleventyConfig.addPassthroughCopy("src/assets");
|
||||
eleventyConfig.addPassthroughCopy({ "src/favicon/*" : "/" });
|
||||
eleventyConfig.addGlobalData("pathPrefix", pathPrefix);
|
||||
eleventyConfig.addGlobalData("buildTime", buildTime);
|
||||
|
||||
eleventyConfig.addCollection("projects", function(collection) {
|
||||
return collection.getFilteredByGlob("src/projects/*/*.md");
|
||||
const col = collection.getFilteredByGlob("src/projects/*/*.md");
|
||||
return col;
|
||||
});
|
||||
|
||||
eleventyConfig.addGlobalData("pathPrefix", pathPrefix)
|
||||
|
||||
eleventyConfig.addGlobalData("eleventyComputed", {
|
||||
projectData: (data) => {
|
||||
const inputPath = data.page.inputPath;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue