-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always use the latest version, by looking at the latest version released
- Loading branch information
Showing
4 changed files
with
48 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,43 @@ | ||
const pluginRss = require("@11ty/eleventy-plugin-rss"); | ||
const markdownIt = require("markdown-it"); | ||
|
||
module.exports = function(eleventyConfig) { | ||
eleventyConfig.addPassthroughCopy("src/assets"); | ||
eleventyConfig.addPassthroughCopy("src/favicon.ico"); | ||
eleventyConfig.addPlugin(pluginRss); | ||
|
||
eleventyConfig.setFrontMatterParsingOptions({ | ||
excerpt: true, | ||
}); | ||
|
||
eleventyConfig.addFilter("md", function (content = "") { | ||
return markdownIt({ html: true }).render(content); | ||
}); | ||
|
||
eleventyConfig.addFilter("dateIso", date => { | ||
return date.toISOString(); | ||
}); | ||
|
||
eleventyConfig.addFilter("dateReadable", date => { | ||
return date.toDateString(); | ||
}); | ||
|
||
eleventyConfig.addCollection("posts", function(collection) { | ||
return collection.getFilteredByGlob("src/news/*.md"); | ||
}); | ||
|
||
return { | ||
dir: { | ||
input: "src", | ||
output: "dist", | ||
includes: "_layouts" | ||
} | ||
}; | ||
} | ||
module.exports = function (eleventyConfig) { | ||
eleventyConfig.addPassthroughCopy("src/assets"); | ||
eleventyConfig.addPassthroughCopy("src/favicon.ico"); | ||
eleventyConfig.addPlugin(pluginRss); | ||
|
||
eleventyConfig.setFrontMatterParsingOptions({ | ||
excerpt: true, | ||
}); | ||
|
||
eleventyConfig.addFilter("md", function (content = "") { | ||
return markdownIt({ html: true }).render(content); | ||
}); | ||
|
||
eleventyConfig.addFilter("dateIso", (date) => { | ||
return date.toISOString(); | ||
}); | ||
|
||
eleventyConfig.addFilter("dateReadable", (date) => { | ||
return date.toDateString(); | ||
}); | ||
|
||
eleventyConfig.addCollection("posts", function (collection) { | ||
return collection.getFilteredByGlob("src/news/*.md"); | ||
}); | ||
|
||
eleventyConfig.addFilter("getLatestVersion", function (collection) { | ||
// Find the latest known version from the collection | ||
return collection?.reduce((latest, item) => { | ||
return !latest || item.data.version > latest ? item.data.version : latest; | ||
}, null); | ||
}); | ||
|
||
return { | ||
dir: { | ||
input: "src", | ||
output: "dist", | ||
includes: "_layouts", | ||
}, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,5 @@ | |
"name": "Dangerzone development team", | ||
"email": "[email protected]" | ||
}, | ||
"github_repo": "https://github.com/freedomofpress/dangerzone", | ||
"version": "0.8.0" | ||
"github_repo": "https://github.com/freedomofpress/dangerzone" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters