Public Access
1
0

feat: prism and command-line plugin
All checks were successful
Build and Push Docker Image to Gitea / build-and-push-to-gitea (push) Successful in 1m18s

This commit is contained in:
2025-09-06 01:27:40 -04:00
parent c9412d2a34
commit d35c154396
6 changed files with 29 additions and 124 deletions

View File

@@ -13,7 +13,7 @@ module.exports = function(eleventyConfig) {
eleventyConfig.addPassthroughCopy({ "src/favicon" : "/" } );
eleventyConfig.addPassthroughCopy({ 'src/robots.txt': '/robots.txt' });
eleventyConfig.addPassthroughCopy({ 'src/sitemap.xml': '/sitemap.xml' });
eleventyConfig.addPassthroughCopy("src/css/prism-tomorrow.css");
eleventyConfig.addPassthroughCopy("src/css/prism.css");
eleventyConfig.addPassthroughCopy("src/assets/fontawesome");
eleventyConfig.addPassthroughCopy("src/assets/googlefonts");
@@ -46,6 +46,14 @@ module.exports = function(eleventyConfig) {
</div>`;
});
// Shortcode for creating a console output
// This is a "paired shortcode" which means it has a start and end tag.
eleventyConfig.addPairedShortcode("command", function(content, user, host, output,) {
return `<pre class="command-line language-bash" data-user="${ user }" data-host="${ host }" data-output="${ output }">
<code class="language-bash">${content}</code>
</pre>`;
});
// Add a shortcode for the current year for the footer
eleventyConfig.addShortcode("year", () => `${new Date().getFullYear()}`);