How to use project's root README.md as index.md #8774
Replies: 5 comments
-
|
I'm actually wondering the same thing |
Beta Was this translation helpful? Give feedback.
-
|
Has anyone figured this out? |
Beta Was this translation helpful? Give feedback.
-
As far as I knows. There is no such functionality on docfx.
So It need to specify site directory (e.g. |
Beta Was this translation helpful? Give feedback.
-
|
As seen in this Test, you can simply prepend your docfx/test/Docfx.Build.Tests/ConceptualDocumentProcessorTest.cs Lines 162 to 164 in 0cceb23 ---
outputFileName: index.html
---
# My cool project
Your `README.md` content |
Beta Was this translation helpful? Give feedback.
-
Using README.md in your docs:
https://github.com/dotmake-build/docfx-plus#using-readmemd-in-your-docs |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm sorry I have to ask this question, but I haven't found an answer and I couldn't figure it out myself.
I have the following project folder structure:
The
docfx.jsonfile contents:{ "metadata": [ { "src": [ { "files": ["Library/**.csproj"], "exclude": ["**/bin/**", "**/obj/**"] } ], "dest": "_docs/api", "includePrivateMembers": false, "disableGitFeatures": false, "disableDefaultFilter": false, "noRestore": false, "namespaceLayout": "flattened", "memberLayout": "samePage", "allowCompilationErrors": false } ], "build": { "content": [ { "files": ["**"], "src": "_docs/api", "dest": "api" }, { "files": ["articles/**.md", "articles/**/toc.yml", "toc.yml", "*.md"], "src": "_docs" } ], "resource": [ { "files": ["**"], "src": "Resources", "dest": "images" } ], "globalMetadata": { "_appFaviconPath": "images/Icon.ico", "_appLogoPath": "images/Icon.png" }, "output": "docs", "globalMetadataFiles": [], "fileMetadataFiles": [], "template": ["default", "modern"], "postProcessors": [], "keepFileLink": false, "disableGitFeatures": false } }And
_docs/toc.yml:Right now I'm building docs with a script:
cp README.md _docs/index.md # I reference LICENSE from my README, so it throws warning on docfx build if it's not copied manually cp LICENSE.md _docs/LICENSE.md docfx metadata docfx build docfx serveBut this doesn't seem like a good approach for using README as index page. Is it somehow possible to do through
docfx.json?Plus, for unknown reason, when I look at page on my localhost, it doesn't automatically loads
index.md, it loads the project directory first, so I have to navigate todocsfolder to see the website. How can this be fixed?Beta Was this translation helpful? Give feedback.
All reactions