diff --git a/astro.config.mjs b/astro.config.mjs
index 8dd0a93..8e29f25 100644
--- a/astro.config.mjs
+++ b/astro.config.mjs
@@ -28,6 +28,9 @@ export default defineConfig({
},
favicon: '/favicon.ico',
customCss: ['./src/styles/incognito.css'],
+ markdown: {
+ processedDirs: ['./src/content/shared-courses/'],
+ },
head: [
{
tag: 'script',
diff --git a/docs/supplemental-content.json b/docs/supplemental-content.json
index e8f0148..5469c7e 100644
--- a/docs/supplemental-content.json
+++ b/docs/supplemental-content.json
@@ -35,7 +35,7 @@
"category": "computer-science-recovery"
},
{
- "destination": "src/content/docs/data-science-and-ai/year-1/block-1/discrete-mathematics.md",
+ "destination": "src/content/docs/data-science-and-ai/year-1/block-1/discrete-mathematics.mdx",
"source": "https://msvincognito.nl/wiki/study/bachelor/year_1/block_1/discrete_mathematics",
"category": "live-course-recovery"
},
@@ -45,32 +45,32 @@
"category": "live-course-recovery"
},
{
- "destination": "src/content/docs/data-science-and-ai/year-1/block-1/procedural-programming.md",
+ "destination": "src/content/docs/data-science-and-ai/year-1/block-1/procedural-programming.mdx",
"source": "https://msvincognito.nl/wiki/study/bachelor/year_1/block_1/procedural_programming",
"category": "live-course-recovery"
},
{
- "destination": "src/content/docs/data-science-and-ai/year-1/block-2/calculus.md",
+ "destination": "src/content/docs/data-science-and-ai/year-1/block-2/calculus.mdx",
"source": "https://msvincognito.nl/wiki/study/bachelor/year_1/block_2/calculus",
"category": "live-course-recovery"
},
{
- "destination": "src/content/docs/data-science-and-ai/year-1/block-2/logic.md",
+ "destination": "src/content/docs/data-science-and-ai/year-1/block-2/logic.mdx",
"source": "https://msvincognito.nl/wiki/study/bachelor/year_1/block_2/logic",
"category": "live-course-recovery"
},
{
- "destination": "src/content/docs/data-science-and-ai/year-1/block-2/objects-in-programming.md",
+ "destination": "src/content/docs/data-science-and-ai/year-1/block-2/objects-in-programming.mdx",
"source": "https://msvincognito.nl/wiki/study/bachelor/year_1/block_2/objects_in_programming",
"category": "live-course-recovery"
},
{
- "destination": "src/content/docs/data-science-and-ai/year-1/block-4/data-structures-and-algorithms.md",
+ "destination": "src/content/docs/data-science-and-ai/year-1/block-4/data-structures-and-algorithms.mdx",
"source": "https://msvincognito.nl/wiki/study/bachelor/year_1/block_4/data_structures_and_algorithms",
"category": "live-course-recovery"
},
{
- "destination": "src/content/docs/data-science-and-ai/year-1/block-4/linear-algebra.md",
+ "destination": "src/content/docs/data-science-and-ai/year-1/block-4/linear-algebra.mdx",
"source": "https://msvincognito.nl/wiki/study/bachelor/year_1/block_4/linear_algebra",
"category": "live-course-recovery"
},
@@ -323,5 +323,40 @@
"destination": "src/content/docs/useful-information/surviving-dacs.md",
"source": "https://wiki.msvincognito.nl/useful-guides/survivingdacs",
"category": "useful-guide-recovery"
+ },
+ {
+ "destination": "src/content/docs/computer-science/year-1/period-1/discrete-mathematics.mdx",
+ "source": "origin/isaacs-changes@d5d6730",
+ "category": "shared-course-wrapper"
+ },
+ {
+ "destination": "src/content/docs/computer-science/year-1/period-1/procedural-programming.mdx",
+ "source": "origin/isaacs-changes@d5d6730",
+ "category": "shared-course-wrapper"
+ },
+ {
+ "destination": "src/content/docs/computer-science/year-1/period-2/calculus.mdx",
+ "source": "origin/isaacs-changes@d5d6730",
+ "category": "shared-course-wrapper"
+ },
+ {
+ "destination": "src/content/docs/computer-science/year-1/period-2/logic.mdx",
+ "source": "origin/isaacs-changes@d5d6730",
+ "category": "shared-course-wrapper"
+ },
+ {
+ "destination": "src/content/docs/computer-science/year-1/period-2/objects-in-programming.mdx",
+ "source": "origin/isaacs-changes@d5d6730",
+ "category": "shared-course-wrapper"
+ },
+ {
+ "destination": "src/content/docs/computer-science/year-1/period-4/data-structures-and-algorithms.mdx",
+ "source": "origin/isaacs-changes@d5d6730",
+ "category": "shared-course-wrapper"
+ },
+ {
+ "destination": "src/content/docs/computer-science/year-1/period-4/linear-algebra.mdx",
+ "source": "origin/isaacs-changes@d5d6730",
+ "category": "shared-course-wrapper"
}
]
diff --git a/src/content/docs/computer-science/year-1/period-1/discrete-mathematics.mdx b/src/content/docs/computer-science/year-1/period-1/discrete-mathematics.mdx
new file mode 100644
index 0000000..bacf6c6
--- /dev/null
+++ b/src/content/docs/computer-science/year-1/period-1/discrete-mathematics.mdx
@@ -0,0 +1,9 @@
+---
+title: Discrete Mathematics
+description: Historical course details for Discrete Mathematics, recovered from the previous Incognito wiki.
+---
+
+import SharedCourse from '../../../../shared-courses/year-1/discrete-mathematics.mdx';
+
+
+
diff --git a/src/content/docs/computer-science/year-1/period-1/procedural-programming.mdx b/src/content/docs/computer-science/year-1/period-1/procedural-programming.mdx
new file mode 100644
index 0000000..b391fed
--- /dev/null
+++ b/src/content/docs/computer-science/year-1/period-1/procedural-programming.mdx
@@ -0,0 +1,9 @@
+---
+title: Procedural Programming
+description: Historical course details for Procedural Programming, recovered from the previous Incognito wiki.
+---
+
+import SharedCourse from '../../../../shared-courses/year-1/procedural-programming.mdx';
+
+
+
diff --git a/src/content/docs/computer-science/year-1/period-2/calculus.mdx b/src/content/docs/computer-science/year-1/period-2/calculus.mdx
new file mode 100644
index 0000000..439d5dd
--- /dev/null
+++ b/src/content/docs/computer-science/year-1/period-2/calculus.mdx
@@ -0,0 +1,9 @@
+---
+title: Calculus
+description: Historical course details for Calculus, recovered from the previous Incognito wiki.
+---
+
+import SharedCourse from '../../../../shared-courses/year-1/calculus.mdx';
+
+
+
diff --git a/src/content/docs/computer-science/year-1/period-2/logic.mdx b/src/content/docs/computer-science/year-1/period-2/logic.mdx
new file mode 100644
index 0000000..c42faa5
--- /dev/null
+++ b/src/content/docs/computer-science/year-1/period-2/logic.mdx
@@ -0,0 +1,9 @@
+---
+title: Logic
+description: Historical course details for Logic, recovered from the previous Incognito wiki.
+---
+
+import SharedCourse from '../../../../shared-courses/year-1/logic.mdx';
+
+
+
diff --git a/src/content/docs/computer-science/year-1/period-2/objects-in-programming.mdx b/src/content/docs/computer-science/year-1/period-2/objects-in-programming.mdx
new file mode 100644
index 0000000..6386e56
--- /dev/null
+++ b/src/content/docs/computer-science/year-1/period-2/objects-in-programming.mdx
@@ -0,0 +1,9 @@
+---
+title: Objects in Programming
+description: Historical course details for Objects in Programming, recovered from the previous Incognito wiki.
+---
+
+import SharedCourse from '../../../../shared-courses/year-1/objects-in-programming.mdx';
+
+
+
diff --git a/src/content/docs/computer-science/year-1/period-4/data-structures-and-algorithms.mdx b/src/content/docs/computer-science/year-1/period-4/data-structures-and-algorithms.mdx
new file mode 100644
index 0000000..511a544
--- /dev/null
+++ b/src/content/docs/computer-science/year-1/period-4/data-structures-and-algorithms.mdx
@@ -0,0 +1,9 @@
+---
+title: Data Structures and Algorithms
+description: Historical course details for Data Structures and Algorithms, recovered from the previous Incognito wiki.
+---
+
+import SharedCourse from '../../../../shared-courses/year-1/data-structures-and-algorithms.mdx';
+
+
+
diff --git a/src/content/docs/computer-science/year-1/period-4/linear-algebra.mdx b/src/content/docs/computer-science/year-1/period-4/linear-algebra.mdx
new file mode 100644
index 0000000..1333831
--- /dev/null
+++ b/src/content/docs/computer-science/year-1/period-4/linear-algebra.mdx
@@ -0,0 +1,9 @@
+---
+title: Linear Algebra
+description: Historical course details for Linear Algebra, recovered from the previous Incognito wiki.
+---
+
+import SharedCourse from '../../../../shared-courses/year-1/linear-algebra.mdx';
+
+
+
diff --git a/src/content/docs/data-science-and-ai/year-1/block-1/discrete-mathematics.mdx b/src/content/docs/data-science-and-ai/year-1/block-1/discrete-mathematics.mdx
new file mode 100644
index 0000000..bacf6c6
--- /dev/null
+++ b/src/content/docs/data-science-and-ai/year-1/block-1/discrete-mathematics.mdx
@@ -0,0 +1,9 @@
+---
+title: Discrete Mathematics
+description: Historical course details for Discrete Mathematics, recovered from the previous Incognito wiki.
+---
+
+import SharedCourse from '../../../../shared-courses/year-1/discrete-mathematics.mdx';
+
+
+
diff --git a/src/content/docs/data-science-and-ai/year-1/block-1/procedural-programming.mdx b/src/content/docs/data-science-and-ai/year-1/block-1/procedural-programming.mdx
new file mode 100644
index 0000000..b391fed
--- /dev/null
+++ b/src/content/docs/data-science-and-ai/year-1/block-1/procedural-programming.mdx
@@ -0,0 +1,9 @@
+---
+title: Procedural Programming
+description: Historical course details for Procedural Programming, recovered from the previous Incognito wiki.
+---
+
+import SharedCourse from '../../../../shared-courses/year-1/procedural-programming.mdx';
+
+
+
diff --git a/src/content/docs/data-science-and-ai/year-1/block-2/calculus.mdx b/src/content/docs/data-science-and-ai/year-1/block-2/calculus.mdx
new file mode 100644
index 0000000..439d5dd
--- /dev/null
+++ b/src/content/docs/data-science-and-ai/year-1/block-2/calculus.mdx
@@ -0,0 +1,9 @@
+---
+title: Calculus
+description: Historical course details for Calculus, recovered from the previous Incognito wiki.
+---
+
+import SharedCourse from '../../../../shared-courses/year-1/calculus.mdx';
+
+
+
diff --git a/src/content/docs/data-science-and-ai/year-1/block-2/logic.mdx b/src/content/docs/data-science-and-ai/year-1/block-2/logic.mdx
new file mode 100644
index 0000000..c42faa5
--- /dev/null
+++ b/src/content/docs/data-science-and-ai/year-1/block-2/logic.mdx
@@ -0,0 +1,9 @@
+---
+title: Logic
+description: Historical course details for Logic, recovered from the previous Incognito wiki.
+---
+
+import SharedCourse from '../../../../shared-courses/year-1/logic.mdx';
+
+
+
diff --git a/src/content/docs/data-science-and-ai/year-1/block-2/objects-in-programming.mdx b/src/content/docs/data-science-and-ai/year-1/block-2/objects-in-programming.mdx
new file mode 100644
index 0000000..6386e56
--- /dev/null
+++ b/src/content/docs/data-science-and-ai/year-1/block-2/objects-in-programming.mdx
@@ -0,0 +1,9 @@
+---
+title: Objects in Programming
+description: Historical course details for Objects in Programming, recovered from the previous Incognito wiki.
+---
+
+import SharedCourse from '../../../../shared-courses/year-1/objects-in-programming.mdx';
+
+
+
diff --git a/src/content/docs/data-science-and-ai/year-1/block-4/data-structures-and-algorithms.mdx b/src/content/docs/data-science-and-ai/year-1/block-4/data-structures-and-algorithms.mdx
new file mode 100644
index 0000000..511a544
--- /dev/null
+++ b/src/content/docs/data-science-and-ai/year-1/block-4/data-structures-and-algorithms.mdx
@@ -0,0 +1,9 @@
+---
+title: Data Structures and Algorithms
+description: Historical course details for Data Structures and Algorithms, recovered from the previous Incognito wiki.
+---
+
+import SharedCourse from '../../../../shared-courses/year-1/data-structures-and-algorithms.mdx';
+
+
+
diff --git a/src/content/docs/data-science-and-ai/year-1/block-4/linear-algebra.mdx b/src/content/docs/data-science-and-ai/year-1/block-4/linear-algebra.mdx
new file mode 100644
index 0000000..1333831
--- /dev/null
+++ b/src/content/docs/data-science-and-ai/year-1/block-4/linear-algebra.mdx
@@ -0,0 +1,9 @@
+---
+title: Linear Algebra
+description: Historical course details for Linear Algebra, recovered from the previous Incognito wiki.
+---
+
+import SharedCourse from '../../../../shared-courses/year-1/linear-algebra.mdx';
+
+
+
diff --git a/src/content/docs/data-science-and-ai/year-1/block-2/calculus.md b/src/content/shared-courses/year-1/calculus.mdx
similarity index 100%
rename from src/content/docs/data-science-and-ai/year-1/block-2/calculus.md
rename to src/content/shared-courses/year-1/calculus.mdx
diff --git a/src/content/docs/data-science-and-ai/year-1/block-4/data-structures-and-algorithms.md b/src/content/shared-courses/year-1/data-structures-and-algorithms.mdx
similarity index 100%
rename from src/content/docs/data-science-and-ai/year-1/block-4/data-structures-and-algorithms.md
rename to src/content/shared-courses/year-1/data-structures-and-algorithms.mdx
diff --git a/src/content/docs/data-science-and-ai/year-1/block-1/discrete-mathematics.md b/src/content/shared-courses/year-1/discrete-mathematics.mdx
similarity index 100%
rename from src/content/docs/data-science-and-ai/year-1/block-1/discrete-mathematics.md
rename to src/content/shared-courses/year-1/discrete-mathematics.mdx
diff --git a/src/content/docs/data-science-and-ai/year-1/block-4/linear-algebra.md b/src/content/shared-courses/year-1/linear-algebra.mdx
similarity index 100%
rename from src/content/docs/data-science-and-ai/year-1/block-4/linear-algebra.md
rename to src/content/shared-courses/year-1/linear-algebra.mdx
diff --git a/src/content/docs/data-science-and-ai/year-1/block-2/logic.md b/src/content/shared-courses/year-1/logic.mdx
similarity index 100%
rename from src/content/docs/data-science-and-ai/year-1/block-2/logic.md
rename to src/content/shared-courses/year-1/logic.mdx
diff --git a/src/content/docs/data-science-and-ai/year-1/block-2/objects-in-programming.md b/src/content/shared-courses/year-1/objects-in-programming.mdx
similarity index 100%
rename from src/content/docs/data-science-and-ai/year-1/block-2/objects-in-programming.md
rename to src/content/shared-courses/year-1/objects-in-programming.mdx
diff --git a/src/content/docs/data-science-and-ai/year-1/block-1/procedural-programming.md b/src/content/shared-courses/year-1/procedural-programming.mdx
similarity index 100%
rename from src/content/docs/data-science-and-ai/year-1/block-1/procedural-programming.md
rename to src/content/shared-courses/year-1/procedural-programming.mdx
diff --git a/tests/content-audit.test.mjs b/tests/content-audit.test.mjs
index ab7b124..7d83e8f 100644
--- a/tests/content-audit.test.mjs
+++ b/tests/content-audit.test.mjs
@@ -44,8 +44,8 @@ test('the full migration audit accounts for every source and destination', async
assert.equal(result.sourceCount, 29);
assert.equal(result.destinationCount, 28);
- assert.equal(result.pageCount, 93);
- assert.equal(result.supplementalCount, 65);
+ assert.equal(result.pageCount, 100);
+ assert.equal(result.supplementalCount, 72);
});
test('published source pages leave the sole H1 to Starlight frontmatter rendering', async () => {
@@ -235,8 +235,8 @@ test('audit accepts a published page declared in the supplemental registry', asy
supplemental,
});
- assert.equal(result.pageCount, 93);
- assert.equal(result.supplementalCount, 65);
+ assert.equal(result.pageCount, 100);
+ assert.equal(result.supplementalCount, 72);
});
});
diff --git a/tests/shared-programme-courses.test.mjs b/tests/shared-programme-courses.test.mjs
new file mode 100644
index 0000000..58c4653
--- /dev/null
+++ b/tests/shared-programme-courses.test.mjs
@@ -0,0 +1,28 @@
+import assert from 'node:assert/strict';
+import { readFile, stat } from 'node:fs/promises';
+import test from 'node:test';
+
+const pairs = [
+ ['block-1', 'period-1', 'discrete-mathematics'],
+ ['block-1', 'period-1', 'procedural-programming'],
+ ['block-2', 'period-2', 'calculus'],
+ ['block-2', 'period-2', 'logic'],
+ ['block-2', 'period-2', 'objects-in-programming'],
+ ['block-4', 'period-4', 'data-structures-and-algorithms'],
+ ['block-4', 'period-4', 'linear-algebra'],
+];
+
+test('shared courses have one body and two programme wrappers', async () => {
+ for (const [block, period, slug] of pairs) {
+ const partial = `src/content/shared-courses/year-1/${slug}.mdx`;
+ assert.ok((await stat(partial)).isFile());
+ for (const wrapper of [
+ `src/content/docs/data-science-and-ai/year-1/${block}/${slug}.mdx`,
+ `src/content/docs/computer-science/year-1/${period}/${slug}.mdx`,
+ ]) {
+ const content = await readFile(wrapper, 'utf8');
+ assert.match(content, new RegExp(`shared-courses/year-1/${slug}\\.mdx`));
+ assert.doesNotMatch(content, /## Full course description/);
+ }
+ }
+});