diff --git a/src/main/js/Template.js b/src/main/js/Template.js index 55fa1ae..9792e9f 100644 --- a/src/main/js/Template.js +++ b/src/main/js/Template.js @@ -85,16 +85,18 @@ export const nav = function (highlightPath = "") { */ const unpackEntry = function (entry, path = "/", highlightPath = "") { const shouldHighlight = highlightPath.startsWith(`${path + entry.name}/`); + const isExternalLink = !entry.link.startsWith("https://fwdekker.com/") && entry.link !== "#"; + const formattedName = (isExternalLink ? "⎋ " : "") + entry.name; if (entry.entries.length === 0) - return `
  • ${entry.name}
  • `; + return `
  • ${formattedName}
  • `; const depth = path.split("/").length - 2; // -1 because count parts, then another -1 because of leading `/` const arrow = depth === 0 ? "▾" : "▸"; return "" + `
  • ` + - `${entry.name} ${arrow}` + + `${formattedName} ${arrow}` + `` + `
  • `; };