Markdown Blog Post Import / Sync - Serve the blog post content from a markdown directory
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C#
- Sterne
- 428
- Forks
- 95
- Ø Merge
- 3 Min.
- Gemergte PRs (30 T.)
- 7
Beschreibung
The current state of the blog is: Users write Markdown inside the blog post and the blog renders this to the enduser to HTML.
An obvious automation for that is that we introduce a background job that monitors (via NCronJob.IJob) a directory/repository/... and automatically imports them into the blog. That allows the blog post as a vehicle, but authoring/versioning happens via GitHub for example.
The question is, how should we get certain metadata:
- Via folder structure
- One markdown with a header section
- A Mix of both?
My current way of thinking is the second option, as we also need some way of having a unique ID in the markdown file in case users change the title and we can't associated markdown file to the blog post in the blog itself. It might look something like:
----------
id: some-string-that-has-to-be-unique
title: Here comes the title
tags: tag 1, tag 2
image: https://some-image.url/image.webp
fallbackimage: https://some-image.url/fallback-image.jpg
published: true
----------
The first block is the Short Description that allows arbitrary Markdown
----------
The second block is the Content that allows arbitrary Markdown
The "interface" has to be well documented in our docs. Our BlogPost entity needs the new ExternalId as property to keep track of the source.
The configuration of the target will happen in the appsettings.json file and we need a new migration for the UpgradeAssistent. We may want a new section like:
{
"markdownImport": {
"sourceType": "GitHub",
"url": "https://github.com/...."
}
}
For starters we can begin with a flat directory as this doesn't need any additional packages and knowledge about the source. So for example url would be https://github.com/linkdotnet/blog-source/main/md/ and in there would be all files, which we would parse from top to bottom in alphatical order.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem Lesen der BlogPost-Entität und des Einstiegspunkts NCronJob.IJob und untersuche anschließend appsettings.json sowie den Migrationsbereich UpgradeAssistent. Das Issue fordert außerdem, die Markdown-Schnittstelle zu dokumentieren. Als abgeschlossen gilt die Aufgabe, wenn der vorgeschlagene Import aus einem flachen Verzeichnis, die Verarbeitung der Metadaten, die Nachverfolgung von ExternalId, die Konfiguration, die Migration und die Dokumentation vollständig definiert und implementiert sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp, markdown
- Bereich
- backend, database, documentation
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 28/100