Closed jstac closed 1 year ago
@jstac I am going to move this issue to the quantecon-book-theme
repo.
Background: This was opened in the continous time mc lecture series issue tracker, which is where the bug occcured. I haven't noticed it in other lecture series, which is why I opened it there.
Ooh no. Will prioritize this.
Hi @AakashGfude, I've attached all my findings here as discussed. I hope this could help.
The thing is that when we click on the view source
button, it actually forms an URL in the form:
<li data-tippy-content="View Source"><a target="_blank" href="{{ theme_repository_url }}{{github_sourcefolder}}/{{ sourcename }}" download><i data-feather="github"></i></a></li>
I found this in quantecon-book-theme/quantecon_book_theme/layout.html
.
The part github_sourcefolder
will give us a directory in github.
Usually, since we are pointing to a blob
object, this part should be /blob/main/lectures
.
But in our URLs, what we get from this part is /tree/master/lectures
.
(In continuous_time_mcs it is /tree/master/ctmc_lectures
and the ctmc_lectures
directory doesn't exist)
Attached below are all the URLs generated by clicking view source
in all python-related repositories in QuantEcon.
https://github.com/QuantEcon/lecture-python-intro/tree/master/lectures/intro.md
https://github.com/QuantEcon/lecture-python.myst/tree/master/lectures/intro.md
https://github.com/QuantEcon/lecture-python-programming.myst/tree/master/lectures/intro.md
https://github.com/QuantEcon/lecture-python-advanced.myst/tree/master/lectures/intro.md
https://github.com/QuantEcon/lecture-datascience.myst/tree/main/lectures/index.md
https://github.com/jstac/continuous_time_mcs/tree/master/ctmc_lectures/intro.md
The thing is that the difference between /blob
and /tree
doesn't really matter because GitHub will auto-correct this.
(Of course it would be better if we can be more specific)
But there's a difference with master
and main
as they are completely differet branches.
GitHub can auto-correct master
to main
but not the other way.
(That's another reason why we are getting 404 in continuous_time_mcs).
Thanks @HengchengZhang for the detailed description. Although, I am not able to replicate it locally or online, for example in https://python.quantecon.org/intro.html , View Source
produces links with blob. Is it happening for you locally?
Thanks @AakashGfude for look into this, you can right click on the GitHub icon and paste it somewhere else to get the original link.
If left click it, the new link will be autocorrect by GitHub in the new page.
Ahh yup. Got it. Thanks @HengchengZhang
CC @mmcky @AakashGfude