Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Markdown Blog Post Import / Sync - Serve the blog post content from a markdown directory

未关闭
#484 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
28/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
csharp, markdown

调研方向

首先阅读 BlogPost 实体和 NCronJob.IJob 入口点,然后检查 appsettings.json 和 UpgradeAssistent 迁移区域。该 issue 还要求记录 markdown 接口的文档。只有在提议的平面目录导入、元数据处理、ExternalId 跟踪、配置、迁移和文档都完成定义并实现后,才算完成。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
C#
星标
428
派生
95
平均合并
3 分钟
30 天内合并 PR
7

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

linkdotnet/Blog 的其他 Issue

查看 linkdotnet/Blog 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。