refactor: share common bachelor course content
This commit is contained in:
parent
bceac4ad17
commit
6c3900a1d4
25 changed files with 203 additions and 11 deletions
|
|
@ -28,6 +28,9 @@ export default defineConfig({
|
|||
},
|
||||
favicon: '/favicon.ico',
|
||||
customCss: ['./src/styles/incognito.css'],
|
||||
markdown: {
|
||||
processedDirs: ['./src/content/shared-courses/'],
|
||||
},
|
||||
head: [
|
||||
{
|
||||
tag: 'script',
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
<SharedCourse />
|
||||
|
||||
|
|
@ -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';
|
||||
|
||||
<SharedCourse />
|
||||
|
||||
|
|
@ -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';
|
||||
|
||||
<SharedCourse />
|
||||
|
||||
|
|
@ -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';
|
||||
|
||||
<SharedCourse />
|
||||
|
||||
|
|
@ -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';
|
||||
|
||||
<SharedCourse />
|
||||
|
||||
|
|
@ -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';
|
||||
|
||||
<SharedCourse />
|
||||
|
||||
|
|
@ -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';
|
||||
|
||||
<SharedCourse />
|
||||
|
||||
|
|
@ -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';
|
||||
|
||||
<SharedCourse />
|
||||
|
||||
|
|
@ -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';
|
||||
|
||||
<SharedCourse />
|
||||
|
||||
|
|
@ -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';
|
||||
|
||||
<SharedCourse />
|
||||
|
||||
|
|
@ -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';
|
||||
|
||||
<SharedCourse />
|
||||
|
||||
|
|
@ -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';
|
||||
|
||||
<SharedCourse />
|
||||
|
||||
|
|
@ -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';
|
||||
|
||||
<SharedCourse />
|
||||
|
||||
|
|
@ -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';
|
||||
|
||||
<SharedCourse />
|
||||
|
||||
|
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
28
tests/shared-programme-courses.test.mjs
Normal file
28
tests/shared-programme-courses.test.mjs
Normal file
|
|
@ -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/);
|
||||
}
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Reference in a new issue