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

Customizing document title used in index #18

Open
stefanseefeld opened this issue Jul 7, 2023 · 2 comments
Open

Customizing document title used in index #18

stefanseefeld opened this issue Jul 7, 2023 · 2 comments

Comments

@stefanseefeld
Copy link

It appears as if the top-level document title, which is shown in the index, corresponds to the title of the index.html file in the uploaded docs. Is there a way to customize that, i.e. use a different title ? For example, in sphinx auto-generated docs the default title always starts with "Welcome to ...", so the dokang index would yield a list of titles all starting with "Welcome to ...", which isn't very useful.

Thanks,

@dbaty
Copy link
Member

dbaty commented Jul 7, 2023

Good point. (Although this is a good sign that your documentation writers should perhaps be more creative with their title? ;) )

I think that we should be able to provide a custom title when uploading the documentation. From a (very quick!) glance, that would mean:

  • adding a title field in the upload form around here. This field should be optional for backward compatibility;
  • passing this title to utils.doc_set() when called here;
  • adding a title=None argument to utils.doc_set();
  • in utils.doc_set(), remove this line so that, by default, the title is what we send to the upload form.

As you may have seen from the commit history, there has not been any substantial contribution to Dokang for a while. I personally don't use Dokang anymore, but I would be willing to review a pull request if you feel inclined to write one. I don't see any test for the upload feature: if you could add one, that would be great.

@stefanseefeld
Copy link
Author

:-)

But creativity questions aside, I can see situations where the toplevel page title is not what I want to see in the index.
Thanks for the suggestions, I'll be working on a PR to add an (optional) title argument.

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

No branches or pull requests

2 participants