« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/content
diff options
context:
space:
mode:
Diffstat (limited to 'src/content')
-rw-r--r--src/content/dependencies/transformContent.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/content/dependencies/transformContent.js b/src/content/dependencies/transformContent.js
index c1415474..fcdc3aa4 100644
--- a/src/content/dependencies/transformContent.js
+++ b/src/content/dependencies/transformContent.js
@@ -1,3 +1,5 @@
+import {basename} from 'node:path';
+
 import {bindFind} from '#find';
 import {replacerSpec, parseContentNodes} from '#replacer';
 
@@ -483,7 +485,13 @@ export default {
                     align === 'center' &&
                       {class: 'align-center'},
 
-                    audio));
+                    [
+                      html.tag('a', {class: 'filename'},
+                        src && {href: src},
+                        language.sanitize(basename(node.src))),
+
+                      audio,
+                    ]));
 
             return {
               type: 'processed-audio',