Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to render README.md for each index? #2431

Closed
LaiArturs opened this issue Oct 30, 2023 · 2 comments
Closed

How to render README.md for each index? #2431

LaiArturs opened this issue Oct 30, 2023 · 2 comments
Labels
question Question about functionality

Comments

@LaiArturs
Copy link

Search terms

README.md, index,

Question

I have a project with following structure:

.
├── package.json
├── src
│   ├── index.ts
│   ├── moduleA
│   │   ├── functionalityA.ts
│   │   ├── index.ts
│   │   └── README.md
│   ├── moduleB
│   │   ├── functionalityB.ts
│   │   ├── index.ts
│   │   └── README.md
│   └── README.md
└── typedoc.json

I would like moduleA and moduleB index to render corresponding README.md file.
I feel that this is something that could be supported, but I can't find a way for it to work.

This is what I get:
image

This is the README.md file I hoped to see rendered:

$ cat src/moduleA/README.md 
# Module A README

This is the README for module A.

This is my typedoc.json:

{
    "entryPoints": [
        "./src/",
        "./src/moduleA/",
        "./src/moduleB/"
    ],
    "out": "docs/",
    "json": "docs/index.json"
}

I build docs with this cmd:

yarn typedoc --options typedoc.json

To be clear I would like all three README.md files to be included in generated documentation:

./src/moduleA/README.md
./src/README.md
./src/moduleB/README.md
@LaiArturs LaiArturs added the question Question about functionality label Oct 30, 2023
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Nov 3, 2023

Currently not supported, unless each module was a separate package and packages mode was used to convert the project. #1870 tracks support for including arbitrary markdown files in the docs.

@LaiArturs
Copy link
Author

This functionality can be achieved with plugin @knodes/typedoc-plugin-pages. However, this plugin only supports TypeDoc version ^0.23.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question about functionality
Projects
None yet
Development

No branches or pull requests

2 participants