-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: add autoDetectPageTitle parameter #33
Conversation
a108e52
to
fdaca5e
Compare
Hey @loopingz, This is a cool feature idea! I've only gotten a chance to glance at the PR, but I'll try and take a deeper look this week. Couple of quick thoughts:
|
Agreed for the unit/integration test, for the marked engine, I never played with it so no idea: maybe we can add that as a futur improvement. I'll have a look |
This feature also reopen the door to just specify a folder and recursively read it to define section and page. I would love the plugin to be able to recursively read this:
Map to a menu like this
With The configuration would look like
|
So, this plugin is actually somewhat of a spiritual successor to my old plugin here: https://github.com/mipatterson/typedoc-plugin-markdown-pages That plugin did allow for recursive folder traversal to detect pages. It seemed really convenient at first, but didn't seem to scale well in actual use, mostly due to the lack of control over titles based on file name. Perhaps with the feature you've proposed to allow defaulting the title based on the contents of the markdown file, it might be more feasible. I'd be interested to know how you would envision handle scenarios where a title could not be parsed from the markdown comments. Throw an error? |
I was thinking of falling back to the name, but throwing an error is probably better, maybe let the user decide with a parameter. Usually, I think letting the user decide the behavior is better. The options I would see is:
|
I do like the idea of allow users to control the error behavior. Another though- I wonder if it would be better to make the option name more generic. Something like My original plugin ( Given some of the other features requests that have been cropping up like #26 and #11, I'm actually going to start this work to add support for at least HTML-based pages. Obviously, HTML pages won't have |
We can rename the parameter to I did work on a plantuml html viewer, I'll link it to issue #11 . I'll update the PR to reflect the change of parameter name. Do you have some documentation on what is Section compares to Group? I'm on Gitter for IM if needed. |
I did update the PR to reflect the latest discussed changes, do you need anything for merging and new release? It would be a great use for me. |
@mipatterson do you have any updates? or schedule when you will be able to review this? |
aa6569c
to
520d825
Compare
Closing the PR and creating a fork |
This feature allows to not define the title and use the first line of the markdowns to read the title
# MyTitle Test
Will read title as MyTitle