Skip to content

title link error for some lectures #236

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

Closed
shlff opened this issue Jun 7, 2023 · 5 comments · Fixed by #339
Closed

title link error for some lectures #236

shlff opened this issue Jun 7, 2023 · 5 comments · Fixed by #339
Labels
bug Something isn't working

Comments

@shlff
Copy link
Member

shlff commented Jun 7, 2023

There is a title link error for some lectures:

some lectures don't have links to their titles.

Please find an example as follows (left: without title links (in black), right: with title links (in blue)):
Screenshot 2023-06-07 at 2 56 28 pm

@jstac
Copy link
Contributor

jstac commented Jun 8, 2023

Thanks @shlff , nice spot.

@shlff
Copy link
Member Author

shlff commented Jun 13, 2023

Thanks for your comments during the meeting @mmcky . It would be great to get your advice here.

@chappiewuzefan
Copy link

chappiewuzefan commented Jun 19, 2023

Hi Team, I can't push my changes to this repository.

Below is what I found:

Normally, Sphnix will automatically create each title heading with the anchor link, like below (the little icon):
image

But if you want the title to be blue and clickable, should add codes below (remove the / ):


/```{contents} The Solow-Swan Growth Model
:depth: 2
/```

and it will generate below table:

image

depth means how many levels subtitles you have (if you have ####, then it should put 4 here)

below code will exist in some of the lectures:


/```{contents} The Solow-Swan Growth Model
:depth: 2
/```

/```{index} single: credits
/```

In this case, there is no table anymore, onle blue titles.

Both cases using depth, the titles are blue and clickable, but it will always point to the first subtitle. So I'm wondering what is we want? We want it all black (default rendered page have the little icon for anchor links) or the table shows in the picture

@shlff
Copy link
Member Author

shlff commented Jun 19, 2023

Thanks @chappiewuzefan .

IMO, the first priority is to have a uniform standard for the title links across all lectures.

Second, the related style we adopted in other lecture series (intermedia, advanced) is the one with blue and clickable titles but without the table.

So from my point of view, one good solution is only to have blue and clickable titles.

Also as @mmcky mentioned in last week's sprint it would be a more elegant solution to put the control code in the _config.yml or _toc.yml so that we don't need to update the style control in every lecture.

It is helpful to discuss different solutions and outcomes here. Once we decide, updating the standard to the manual would be great.

@chappiewuzefan
Copy link

Thanks for clarifying, in this case , only add below code to each lec will solve it (through yml)

/{contents} The Solow-Swan Growth Model :depth: 2 /

Need to decide the depth automatically or just put a big number for example 9 (cause it is rare for the subtitles go to the level 9)

@mmcky mmcky added the bug Something isn't working label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants