[Repo Assist] Add fsdocs init command to scaffold a docs folder#1025
[Repo Assist] Add fsdocs init command to scaffold a docs folder#1025github-actions[bot] wants to merge 5 commits intomainfrom
Conversation
Adds a new 'fsdocs init' verb that creates a minimal docs/index.md (and optionally _template.html) for new projects. Options: --input <dir> Directory to initialise (default: docs) --force Overwrite existing files --with-template Also scaffold a _template.html Closes #872 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/repo-assist the inline template content string seems insufficient compared to https://github.com/fsprojects/FSharp.Formatting/blob/main/docs/_template.html |
…emplate Instead of an inline minimal HTML string, embed docs/_template.html as an assembly resource and read it at runtime, so the scaffolded template is the full, feature-complete template including OpenGraph, theme toggle, search, navigation, and all fsdocs substitutions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Commit pushed:
|
|
🤖 This is an automated response from Repo Assist. Good call, This also means the scaffolded template will automatically stay in sync with the canonical template as the project evolves. Changes pushed:
Build: ✅ succeeded | Runtime test: ✅ full template content confirmed
|
nojaf
left a comment
There was a problem hiding this comment.
Good enough to start out.
Over time we could consider have a more wizard like setup for this.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Closes #872
Summary
Adds a new
fsdocs initverb to thefsdocstool that scaffolds a minimal docs folder for new projects, lowering the barrier for newcomers who previously had to copy-paste folder structures by hand.What it does
Running
dotnet fsdocs initin a project root creates:docs/index.md— a starter landing page with front-matter and placeholder contentWith the optional
--with-templateflag it also creates:docs/_template.html— a minimal HTML template that uses standard{{fsdocs-*}}substitutionsOptions
--input (dir)docs--forcefalse--with-templatefalse_template.htmlImplementation
InitCommand.fswith a[(Verb("init", ...))]type, matching the pattern ofBuildCommandandWatchCommand.Program.fs: addedInitCommandto theParseArgumentstype list andMapResult.fsdocs-tool.fsproj: addedInitCommand.fscompile item.RELEASE_NOTES.md: added entry under[Unreleased] > Added.Test Status
dotnet build FSharp.Formatting.sln --configuration Release→ succeeded (0 errors)dotnet test FSharp.Formatting.sln --configuration Release --no-build→ all 174 tests passed (0 failures)