ChimeraTK / project-template

Template for new projects. Can also be used to update cmake scripts in existing projects by merging the changes. This repository intentionally does not have a README.md (which would create conflicts in the projects using this template). For documentation, please follow this link:
https://github.com/ChimeraTK/project-template/blob/master/HowTo_project-template.md
GNU Lesser General Public License v3.0
1 stars 3 forks source link

Feature - add index.html to doc folder #35

Closed vaeng closed 1 year ago

vaeng commented 1 year ago

It is often tedious to search for the index.html file in the /doc/html folder. This PR will add a redirecting index.html file into the /doc level, that does the forwarding.

mhier commented 1 year ago

Commit messages are wrong. Firstly, this should go into one single commit (we do not want to expose temporary mistakes and such to the master). Secondly, we shall use conventional commits: https://www.conventionalcommits.org/en/v1.0.0/ Hence in this case the commit message shall start with the "feat" prefix. Finally, since this is the project-template, the commit message shall state this clearly (because these commits will end up in all our projects and we want to be able to distinguish them from "real" commits).

Hence I propose the following commit message:

feat(project-template): add redirecting index.html to doc folder

vaeng commented 1 year ago

If I open the index.html inside the doc folder, it does not find the redirection target:

File not found
The file "/home/mhier/software/build/ApplicationCore-debug/doc/doc/html/index.html" cannot be found. It may have been moved, edited, or deleted.

Shouldn't we remove the "doc" component of the path?

That is strange, I had it removed in the first place and it was only working with the added doc.

vaeng commented 1 year ago

Commit messages are wrong. Firstly, this should go into one single commit (we do not want to expose temporary mistakes and such to the master). Secondly, we shall use conventional commits: https://www.conventionalcommits.org/en/v1.0.0/ Hence in this case the commit message shall start with the "feat" prefix. Finally, since this is the project-template, the commit message shall state this clearly (because these commits will end up in all our projects and we want to be able to distinguish them from "real" commits).

Hence I propose the following commit message:

feat(project-template): add redirecting index.html to doc folder

Interesting! I like to have a uniform commit. Can we do this with the squash merge message?

mhier commented 1 year ago

Interesting! I like to have a uniform commit. Can we do this with the squash merge message?

Yes you can, or you can squash the second onto the first with an interactive rebase and edit the message same way. I prefer the second way, because it allows to preview the result before merging into the master and potentially affecting all our projects :-)

mhier commented 1 year ago

That is strange, I had it removed in the first place and it was only working with the added doc.

Maybe it depends how you launch the browser? I used VS code and opened the doc directory directly (not the build directory). If I launch firefox from the shell, it does not even work at all.

What seems to help is remove the doc and also have no leading slash:

            window.location.href = "html/index.html"