-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use page collection for langing page title and content (#197)
closes #196
- Loading branch information
1 parent
67961f2
commit 2c46d04
Showing
5 changed files
with
86 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: Teilen und erweitern Sie Ihr Wissen im Bereich Digital Humanities | ||
--- | ||
|
||
Willkommen bei den ACDH-CH Lernressourcen. Hier finden Sie interaktives Lernmaterial, praktische | ||
HowTo-Artikel und Best Practices Beispiele zu einem breiten Spektrum von Themen, Methoden und | ||
Infrastrukturen aus den Digital Humanities. | ||
|
||
Diese Ressourcen können sowohl für das selbstgesteuerte Lernen als auch für die Lehre im | ||
Hochschulbereich genutzt werden. Es ist Teil unserer Mission, Wissen aus der laufenden Forschung | ||
aktiv in die breitere Digital Humanities Community zu transferieren und damit eine neue Generation | ||
von Geisteswissenschaftlern in der Nutzung von digitalen Methoden auszubilden. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: Share and expand your knowledge in Digital Humanities | ||
--- | ||
|
||
Welcome to ACDH-CH Learning Resources. This website gathers interactive learning material, practical | ||
HowTo articles and best practices on a wide range of Digital Humanities topics, methododologies and | ||
infrastructures. | ||
|
||
These resources can be used for self-guided learning as well as for teaching in higher education. It | ||
is part of our mission to actively transfer knowledge from ongoing research into the wider Digital | ||
Humanities Community as well as to educate a new generation of humanities researchers with digital | ||
methods. | ||
|
||
The platform is being developed in the context of the [DITAH](https://www.ditah.at/) project, funded | ||
by the Austrian Bundesministerium für Wissenschaft, Forschung und Wirtschaft. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { join } from "node:path"; | ||
|
||
import { compile } from "@mdx-js/mdx"; | ||
import withFrontmatter from "remark-frontmatter"; | ||
import withGitHubMarkdown from "remark-gfm"; | ||
import withMdxFrontmatter from "remark-mdx-frontmatter"; | ||
|
||
import { type Locale } from "@/i18n/i18n.config"; | ||
import withTypographicQuotesAndDashes from "@/mdx/plugins/remark-smartypants"; | ||
import { readFile } from "@/mdx/readFile"; | ||
|
||
export async function getPageById(id: string, locale: Locale) { | ||
const filePath = join(process.cwd(), "content", "pages", locale, id + ".mdx"); | ||
const vfile = await readFile(filePath); | ||
|
||
const result = await compile(vfile, { | ||
development: false, | ||
outputFormat: "function-body", | ||
useDynamicImport: false, | ||
remarkPlugins: [ | ||
withGitHubMarkdown, | ||
withTypographicQuotesAndDashes, | ||
withFrontmatter, | ||
withMdxFrontmatter, | ||
], | ||
}); | ||
|
||
return String(result); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters