diff --git a/eleventy.config.js b/eleventy.config.js index 2b1ad2b..900d4a7 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -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; diff --git a/src/_includes/project.njk b/src/_includes/project.njk index e2ee03a..535d3c3 100644 --- a/src/_includes/project.njk +++ b/src/_includes/project.njk @@ -14,32 +14,13 @@ styles: ["project"]

{{ subtitle }}

- + {% if links or docs or images or releaseType %}
{% include "project_image.njk" %}

Here's what we found about this project:

- {% if releaseType %} -

- {% if releaseType == "github" %} - {% set releases = githubRepoOwner | githubReleases(githubRepoName) %} - Releases fetched from GitHub:
-

- {% for release in releases %} - {{ release.name }} - {% endfor %} -
- {% endif %} - {% if releaseType == "local" %} -

{{ releases | length }} releases.

- {% for label, addr in releases %} - {{ label }} - {% endfor %} - {% endif %} -

- {% endif %} {% if links %}

{{ links | length }} links.