Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

feat: Obsidian-style [[wikilinks]] in content

Đã đóng
#51 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
backend

Hướng nghiên cứu

Start with Fanstatic/Helpers/SiteHelper.cs to see how Markdig extensions are registered, then read Parsers/RefShortcodeParser.cs for reference resolution and its error handling. Inspect the test conventions in Fanstatic.Test/ and fixture sites in .TestSites/; run ./build.sh test. Done means the acceptance cases resolve to expected permalinks, unresolved links log errors, and MissingWikiLinkAsError: true fails the build.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

c:content p:medium size:M t:feature
Current State

Markdown content cannot express Obsidian-style [[wikilinks]]. Markdig's UseAdvancedExtensions() (Fanstatic/Helpers/SiteHelper.cs:18-20)
has no wikilink extension, so [[target]] renders as literal text. Hugo sites resolve [text](_)
links through a _markup/render-link.html hook; that is tracked separately by #34.

Tasks:
  • New Markdig inline extension recognizing [[target]] and [[target|label]] (Helpers/WikiLinkExtension.cs)
  • Resolve target mirroring ref/relref (Parsers/RefShortcodeParser.cs): a content path such as
    posts/foo.md or /posts/foo.md, and a taxonomy target such as tags/sucos; a bare [[sucos]]
    tries a taxonomy term first, then a page by path/name. Language and output format default to the
    calling page's.
  • Unresolved target renders a link to ./ and logs an error (build keeps going), matching RefShortcodeParser
  • fanstatic.yaml setting MissingWikiLinkAsError (bool, default false) to escalate unresolved
    wikilinks to build-failing errors
  • Alias resolution is intentionally out of scope (aliases are a post-processed page element)

Tests live in Fanstatic.Test/ (xUnit + NSubstitute); fixture sites in .TestSites/. Run ./build.sh test; new/changed methods need CRAP ≤ 15 and ≥ 75 % line coverage.

Acceptance Criteria:
  • Fixture site: [[posts/foo.md]], [[tags/x]], and bare [[x]] resolve to the expected permalinks;
    [[unknown]] renders ./ with an error logged; with MissingWikiLinkAsError: true the build fails.
Related:
  • #33 (Phase 3 epic, parent)
  • #34 (render hooks for links and images; wikilink output can later route through it)
  • #40 (Markdown extensions configurable in YAML)
Ngôn ngữ chính
C#
Star
1
Fork
0
Merge trung bình
7 giờ
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của MASS4ORG/Fanstatic

Tất cả issue của MASS4ORG/Fanstatic

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.