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

Package page title, favicons, and jump to the package index #75

Open
MisterDA opened this issue Jul 11, 2024 · 2 comments
Open

Package page title, favicons, and jump to the package index #75

MisterDA opened this issue Jul 11, 2024 · 2 comments

Comments

@MisterDA
Copy link

Hi there. I'm a happy user of odig, and I have three little comments.

  1. The package page title could be simplified: I see index (conduit.index), I don't think index is particularly relevant to the user, the title could simply be conduit package.
  2. I think the pages are missing a favicon. It could be one relatively similar to the one used by https://ocaml.org/docs, maybe with a different color. This would allow me to better identify which tab is the one I'm looking for, amongst the hundreds of opened tabs I have.
  3. Once a package doc has been opened, it's impossible to jump back to the list of packages apart from clicking repeatedly on "Up". Maybe an "Index", or "Root" link could be added before the trail of pages? Such as Up – Index » ocaml » Stdlib » String.

Thanks for the hard work!

@dbuenzli
Copy link
Collaborator

Let's keep this open but I'm not sure there's much I can do here since I do not post-process odoc's output and do not plan starting doing so for now. Most of your issues seem related to odoc limitations:

  1. I think odoc simply uses the the name of the .mld file. It could use the {0 heading
    instead.
  2. We'd need to be able to specify something on the cli or perhaps odoc could check the theme directory for a favicon and add a reference to it. (I would also like that to happen for example with JavaScript files), see Support for theming ocaml/odoc#826
  3. Maybe this will be solved with the new structure Odoc 3.0 Planning: Structured Docs, References, Breadcrumbs and Sidebar ocaml/odoc#1097

Just /ccing @panglesd so that he can tell me if I'm wrong on any of the above.

@panglesd
Copy link

I think you are right!

  1. I think odoc simply uses the the name of the .mld file. It could use the {0 heading instead.

I don't remember if it is part of the proposal but we though about having a way to give a short title to pages, to use in the breadcrumbs:

{{0 Short title}Long and classy title}

I also would like support for theming... In the meantime, adding a favicon for odoc's output would be a good idea. I have opened an issue: ocaml/odoc#1160

This kind of improvements are definitely a goal for odoc 3. We haven't yet a definitive answer to how the pages outside of a package will be accessible (eg through breadcrumbs?), but we'll keep this issue in mind!

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

No branches or pull requests

3 participants