diff --git a/internal/app/app_menu.go b/internal/app/app_menu.go
index 365f03f..d15c073 100644
--- a/internal/app/app_menu.go
+++ b/internal/app/app_menu.go
@@ -87,7 +87,7 @@ func (a *App) Menu() *menu.Menu {
helpMenu.AddText("Ask a question", nil, menuCallbackOpenURL(a, "https://github.com/garraflavatra/rolens/discussions/new?category=questions"))
helpMenu.AddSeparator()
helpMenu.AddText("Star Rolens on GitHub", nil, menuCallbackOpenURL(a, "https://github.com/garraflavatra/rolens"))
- helpMenu.AddText("Changelog", nil, menuCallbackOpenURL(a, "https://garraflavatra.github.io/rolens/development/changelog/"))
+ helpMenu.AddText("Changelog", nil, menuCallbackOpenURL(a, "https://garraflavatra.github.io/rolens/colophon/changelog/"))
helpMenu.AddText("License", nil, menuCallbackOpenURL(a, "https://github.com/garraflavatra/rolens/blob/main/LICENSE"))
return appMenu
diff --git a/website/.eleventy.js b/website/.eleventy.js
index d3cd2dc..5b867bc 100644
--- a/website/.eleventy.js
+++ b/website/.eleventy.js
@@ -90,10 +90,21 @@ module.exports = function (eleventyConfig) {
});
// Retrieve content of a file
- eleventyConfig.addShortcode('filecontent', function (fname, startLine = 0) {
- const buf = fs.readFileSync(path.join(indir, fname));
- const str = buf.toString().split('\n').slice(startLine).join('\n');
- return str;
+ eleventyConfig.addShortcode('filecontent', function (fname, a, b) {
+ let str = fs.readFileSync(path.join(indir, fname)).toString();
+
+ if (typeof a === 'number') {
+ // Line indexes
+ str = str.split('\n').slice(a, b).join('\n');
+ }
+ else if (typeof a === 'string') {
+ // Anchors
+ const aIndex = str.indexOf(a) + a.length;
+ const bIndex = b ? str.indexOf(b, aIndex) : undefined;
+ str = str.slice(aIndex, bIndex);
+ }
+
+ return str.trim();
});
// Global options