feat($lib/docs): introduce new docs pipeline #8

Open
ckie wants to merge 4 commits from ckie/init/docs into main
Member

TODO for merge

  • the petalpkgs input takes ~50 min to clone
  • vite insists on iterating through the entire .petalpkgs file tree.
  • code review
  • minimal styling rn, leaving that to jake if they'll have it || @tailwindcss/typography
### TODO for merge - [ ] the petalpkgs input takes ~50 min to clone - [X] vite insists on iterating through the entire `.petalpkgs` file tree. - [ ] code review - [X] minimal styling rn, leaving that to jake if they'll have it || `@tailwindcss/typography`
ckie added 4 commits 2024-10-27 02:10:52 +00:00
ckie reviewed 2024-10-27 02:13:44 +00:00
@ -0,0 +11,4 @@
import type { Node, Root, Code } from "mdast";
import type { Plugin } from "unified";
export const remarkInclude: Plugin<[], Root> = ({ resolveFrom }: { resolveFrom: string }) => {
Author
Member

eventually fix TS complaints
remark-include.ts 14 14 error 2322 Type '({ resolveFrom }: { resolveFrom: string; }) => (tree: any, file: any) => any' is not assignable to type 'Plugin<[], Root>'.

eventually fix TS complaints `remark-include.ts 14 14 error 2322 Type '({ resolveFrom }: { resolveFrom: string; }) => (tree: any, file: any) => any' is not assignable to type 'Plugin<[], Root>'.`
@ -0,0 +22,4 @@
// !== "options" because those are special, parsed from options.json:
// https://github.com/NixOS/nixpkgs/blob/d31617bedffa3e5fe067feba1c68b1a7f644cb4f/pkgs/tools/nix/nixos-render-docs/src/nixos_render_docs/manual.py#L81-L102
console.log("awa", node);
Author
Member

remove

remove
@ -0,0 +34,4 @@
includeContents = readSync(includePath, "utf8");
} catch (err) {
throw new Error(
`The @include file path at ${includePath} was not found.\n\nInclude Location: ${file.path}:${node.position.start.line}:${node.position.start.column}`
Author
Member

update msg

update msg
@ -0,0 +53,4 @@
// trim trailing newline
includeContents.contents = includeContents.contents.trim();
// return contents wrapped inside a "code" node
Author
Member

it renders fine regardless but this is 100% wrong, copy-paste error.

it renders fine regardless but this is 100% wrong, copy-paste error.
ckie requested review from jakehamilton 2024-10-27 02:14:00 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin ckie/init/docs:ckie/init/docs
git checkout ckie/init/docs

Merge

Merge the changes and update on Forgejo.
git checkout main
git merge --no-ff ckie/init/docs
git checkout main
git merge --ff-only ckie/init/docs
git checkout ckie/init/docs
git rebase main
git checkout main
git merge --no-ff ckie/init/docs
git checkout main
git merge --squash ckie/init/docs
git checkout main
git merge --ff-only ckie/init/docs
git checkout main
git merge ckie/init/docs
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: the-distro/floral.systems#8
No description provided.