v2.ocaml.org
v2.ocaml.org copied to clipboard
Adding table of contents on https://ocaml.org/learn/tutorials/ page.
I think it would be feasible for the user if we add a table of contents on https://ocaml.org/learn/tutorials/.
The site now looks like this.
After the change:
Please let me know if you have any suggestions. If this get approved, I would like to work on this. :)
I agree that that would improve consistency inside tutorials given that every tutorial has a table of contents. So I'd say you can go ahead and work on this, if you'd like :) You have two sections in your screenshot: the first one doesn't have a name at the moment and the second one is calle External links
. You could call the first one Tutorials
.
I am facing an issue. I thought if I wanted to make changes in the html syntax, I need to run make local
which would create html files of every md file. When I do so, the changes are visible on browser but the edited file's name is not visible when I run git status
. I am not sure if I am doing it right.
the edited file's name is not visible when I run
git status
My guess would be that the generated html files end up somewhere in ocaml.org/
which is in .gitignore
. Is that possible?
the edited file's name is not visible when I run
git status
My guess would be that the generated html files end up somewhere in
ocaml.org/
which is in.gitignore
. Is that possible?
I didn't know that. :( Can you please guide me about how to make the changes?
Yes, the way that's implemented in ocaml.org is not very standard xD
You can see on the page of one of the concrete tutorials, e.g. a first hour with ocaml how to include a ToC (have a look at the beginning of the file). You can see here in the makefile how that actually triggers the generation of the ToC.
Yes, the way that's implemented in ocaml.org is not very standard xD
You can see on the page of one of the concrete tutorials, e.g. a first hour with ocaml how to include a ToC (have a look at the beginning of the file). You can see here in the makefile how that actually triggers the generation of the ToC.
In the screenshot that I attached above, I added the table of content by adding *Table of contents*
to the md file, but now, I am confused because I want to make some changes to the ToC.
That might be an intersting task to do :) what kind of changes do you want to make?
That might be an intersting task to do :) what kind of changes do you want to make?
Like you said, one section doesn't have a name but the other section is named External Links
. I wanted to add the name for the 1st section.
Sorry for my last 2 replies; after reading the beginning again I've noticed that I totally mixed this up with another issue!
Like you said, one section doesn't have a name but the other section is named External Links. I wanted to add the name for the 1st section.
For adding the name for the 1st section I would guess the easy way would be to add that section header to the page in a way that it is picked up by the ToC generator. The harder and more interesting way (maybe too hard, I'm not sure. cc @patricoferris ) would be to have a look at the ToC generator to see how you could tweak it.
I just caught up with the discussion in this issue and looking at #1493. I don't think adding a ToC to an index page adds much to that particular page, as the links are just repeated. Without a compelling reason otherwise, I'd suggest moving onto another issue. (but thank you for trying it -- it helps to see the result of the change to judge whether or not it's an improvement or not, so this is a positive contribution).