Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/mdoc-extension-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@neuledge/context": patch
---

Recognize `.mdoc` (Markdoc) files when scanning a repository for documentation. Sites built on Astro Starlight (e.g. Nx) ship docs in this format, and they were previously skipped.
2 changes: 1 addition & 1 deletion packages/context/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export function parseMarkdown(source: string, filePath: string): ParsedDoc {
filePath
.split("/")
.pop()
?.replace(/\.(md|mdx|qmd|rmd|adoc|rst)$/, "") ||
?.replace(/\.(md|mdx|mdoc|qmd|rmd|adoc|rst)$/, "") ||
"Untitled";

// Remove frontmatter and JSX import statements from source for extraction
Expand Down
1 change: 1 addition & 0 deletions packages/context/src/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ const FIXTURE_SUFFIXES = ["expect", "test", "spec"];
const DOCUMENTATION_EXTENSIONS = [
".md",
".mdx",
".mdoc",
".qmd",
".rmd",
".adoc",
Expand Down
9 changes: 9 additions & 0 deletions registry/npm/nx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@ description: "Smart, fast, and extensible build system for monorepos"
repository: https://github.com/nrwl/nx

versions:
# Nx 22.7.0 moved docs from `docs/` to `astro-docs/src/content/docs/`
# (Markdoc-based Astro site) and dropped the top-level `docs/` folder.
- min_version: "22.7.0"
source:
type: git
url: https://github.com/nrwl/nx
docs_path: astro-docs/src/content/docs
tag_pattern: "{version}"
- min_version: "17.0.0"
max_version: "22.7.0"
source:
type: git
url: https://github.com/nrwl/nx
Expand Down
Loading