Skip to content

Commit

Permalink
Merge main into mqtt-frontrunner-uns-2
Browse files Browse the repository at this point in the history
  • Loading branch information
sumitshinde-84 committed Dec 18, 2024
2 parents 47092b7 + eb56058 commit b87b997
Show file tree
Hide file tree
Showing 236 changed files with 5,371 additions and 7,720 deletions.
25 changes: 25 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,15 @@ module.exports = function(eleventyConfig) {
}
});

eleventyConfig.addFilter("truncate", function(text, maxWordCount) {
const split = text.split(" ");
if (split.length <= maxWordCount) {
return text;
}
return text.split(" ").splice(0, maxWordCount).join(" ") + "..."
});


eleventyConfig.addFilter("excerpt", function(str) {
const content = new String(str);
return content.split("\n<!--more-->\n")[0]
Expand Down Expand Up @@ -619,6 +628,22 @@ module.exports = function(eleventyConfig) {
return nav;
});

eleventyConfig.addCollection("publications", function(collectionApi) {
return collectionApi.getAll().filter(item => {
return item.data.tags && (item.data.tags.includes("whitepaper") || item.data.tags.includes("ebook"));
}).map(item => {
item.data.tags = item.data.tags.map(tag => {
if (tag.toLowerCase() === 'whitepaper') {
return 'Whitepaper';
} else if (tag.toLowerCase() === 'ebook') {
return 'eBook';
}
return tag;
});
return item;
});
});

// Plugins
eleventyConfig.addPlugin(EleventyRenderPlugin)
eleventyConfig.addPlugin(pluginRSS)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: 'FlowFuse/flowfuse'
ref: maintenance
ref: main
path: 'flowfuse'
- name: Generate a token
id: generate_token
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Build the forge
run: npm run build:skip-images
working-directory: 'website'
- uses: untitaker/hyperlink@0.1.32
- uses: untitaker/hyperlink@0.1.43
with:
args: website/_site/ --check-anchors --sources website/src
- name: Test the website
Expand Down
Loading

0 comments on commit b87b997

Please sign in to comment.