-
-
-
-
-
diff --git a/viewer/src/components/LdTitle.vue b/viewer/src/components/LdTitle.vue
deleted file mode 100644
index e1d47d1..0000000
--- a/viewer/src/components/LdTitle.vue
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
diff --git a/viewer/src/components/async/AsyncLdMarkdown.vue b/viewer/src/components/async/AsyncLdMarkdown.vue
new file mode 100644
index 0000000..213c11c
--- /dev/null
+++ b/viewer/src/components/async/AsyncLdMarkdown.vue
@@ -0,0 +1,125 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/viewer/src/components/async/Markdown.vue b/viewer/src/components/async/Markdown.vue
deleted file mode 100644
index c4e282b..0000000
--- a/viewer/src/components/async/Markdown.vue
+++ /dev/null
@@ -1,123 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/viewer/src/components/async/index.ts b/viewer/src/components/async/index.ts
index 5a7d9a6..05a0814 100644
--- a/viewer/src/components/async/index.ts
+++ b/viewer/src/components/async/index.ts
@@ -1,4 +1,22 @@
-// Declare async constants for internal components
-// Their name can't start with 'Ld'
+/* ldgallery - A static generator which turns a collection of tagged
+-- pictures into a searchable web gallery.
+--
+-- Copyright (C) 2019-2022 Guillaume FOUET
+--
+-- This program is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU Affero General Public License as
+-- published by the Free Software Foundation, either version 3 of the
+-- License, or (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU Affero General Public License for more details.
+--
+-- You should have received a copy of the GNU Affero General Public License
+-- along with this program. If not, see .
+*/
-export const Markdown = () => import(/* webpackChunkName: "markdown" */ "./Markdown.vue");
+import { defineAsyncComponent } from 'vue';
+
+export const LdMarkdown = defineAsyncComponent(() => import(/* webpackChunkName: "markdown" */ './AsyncLdMarkdown.vue'));
diff --git a/viewer/src/components/index.ts b/viewer/src/components/index.ts
deleted file mode 100644
index f34eea1..0000000
--- a/viewer/src/components/index.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-/* ldgallery - A static generator which turns a collection of tagged
--- pictures into a searchable web gallery.
---
--- Copyright (C) 2019-2020 Guillaume FOUET
---
--- This program is free software: you can redistribute it and/or modify
--- it under the terms of the GNU Affero General Public License as
--- published by the Free Software Foundation, either version 3 of the
--- License, or (at your option) any later version.
---
--- This program is distributed in the hope that it will be useful,
--- but WITHOUT ANY WARRANTY; without even the implied warranty of
--- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
--- GNU Affero General Public License for more details.
---
--- You should have received a copy of the GNU Affero General Public License
--- along with this program. If not, see .
-*/
-
-import Vue from "vue";
-
-const requireComponent = require.context(
- "@/components",
- true, // Whether or not to look in subfolders
- // The regular expression used to match base component filenames
- /Ld[A-Z]\w+\.vue$/
-);
-
-requireComponent.keys().forEach(fileName => {
- const componentConfig = requireComponent(fileName);
- const componentName = fileName
- .split("/")
- .pop()!
- .replace(/\.vue$/, "");
-
- // Register component globally
- Vue.component(
- componentName,
- // Look for the component options on `.default`, which will
- // exist if the component was exported with `export default`,
- // otherwise fall back to module's root.
- componentConfig.default ?? componentConfig
- );
-});
diff --git a/viewer/src/components/item_handlers/LdAudioViewer.vue b/viewer/src/components/item_handlers/LdAudioViewer.vue
deleted file mode 100644
index 559b10a..0000000
--- a/viewer/src/components/item_handlers/LdAudioViewer.vue
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-