-
Notifications
You must be signed in to change notification settings - Fork 708
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 parse additional markdown files? #2004
Comments
I tend to not expose new functions unless I have a request or it's immediately obvious to me when implementing that it will be useful in the same form as used by TypeDoc to plugin devs, in this case, I hadn't thought about this use case yet. Sounds like this is something that should be exposed. |
|
@Gerrit0 Thank you for this. I still think that this part of the API is still not optimal for my purpose. With your exposed API I have tried this: const converter = app.converter;
// parse the markdown content
const parsed = converter.parseRawComment(new MinimalSourceFile(model.content, model.filePath));
const programs = /** @type {DocumentationEntryPoint[]} */(app.getEntryPoints()).map(ep => ep.program);
// create a new project so that the link resolver can resolve the links in readme.
const project = new ProjectReflection(converter.name);
project.readme = parsed.summary;
// lastly raise an event so that all listners can do their magic
converter.trigger(Converter.EVENT_RESOLVE_END, new Context(converter, programs, project)); However, ultimately it did not help as the Additionally, I think it is better to expose the const theme = /** @type {DefaultTheme} */ (app.renderer.theme).getRenderContext(pageEvent);
theme.markdown(displayPartsToMarkdown(project.readme, theme.urlTo)) Either that or better encapsulation for the markdown conversion. |
@Gerrit0 Please consider reopening this. |
Hmm... resolving links is something I haven't thought about exposing. I should probably expose a I don't want to expose |
That sounds good as well. |
@Gerrit0 Thanks for the changes. It seems to work pretty well. |
Search terms
Question
I have written a plugin that reads all the non-root/non-readme markdown files and creates HTML files out of those. Additionally it also supports some custom inline-tags. This process looks roughly as follows:
This works as expected except one problem. If the additional markdown files contain inline tags like
{@link}
those remain untouched and are not converted. So I thought to perform the same stuffs that is done for the project readme. However, I see that the relevant components are not exported from the package and additional exports are blocked via theexports
in the package.json.Is there any work around for this? Or am I looking at the wrong places, and there is a easier way to achieve this?
The text was updated successfully, but these errors were encountered: