Skip to content

Invalid Invalid Link with outputFileStrategy: 'modules' and flattenOutputFiles: true #616

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

Closed
lorenzolewis opened this issue May 14, 2024 · 2 comments
Labels
bug Issue raised as a bug.

Comments

@lorenzolewis
Copy link
Contributor

lorenzolewis commented May 14, 2024

What package is the bug related to?

typedoc-plugin-markdown

Describe the issue

When using the TypeDoc config below it will result in invalid internal links.

For example, if this generated file exists: Namespace.dpi.md and you have a link to an item called logicalposition within itself, it will generate this link: namespaces/dpi.md#logicalposition.

I would expect this link to instead be namespace.dpi.md#logicalposition (notice the removal of the trailing s in namespaces and using a . instead of a /.

TypeDoc configuration

{
	// TypeDoc options
	// https://typedoc.org/options/
	githubPages: false,
	hideGenerator: true,
	readme: 'none',
	logLevel: 'Warn',
	parametersFormat: 'table',
	// typedoc-plugin-markdown options
	outputFileStrategy: 'modules',
	flattenOutputFiles: true,
	entryFileName: 'index.md',
	hidePageHeader: true,
	hidePageTitle: true,
	hideBreadcrumbs: true,
	useCodeBlocks: true,
	propertiesFormat: 'table',
	typeDeclarationFormat: 'table',
	useHTMLAnchors: true,
};

Expected behavior

See above. It seems that the option for flattenOutputFiles is not being taken into account.

@tgreyuk
Copy link
Member

tgreyuk commented May 15, 2024

Thank you. Fixed in [email protected].

@lorenzolewis
Copy link
Contributor Author

Perfect! Pulled the latest and can confirm it's working as expected!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue raised as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants