adambard / learnxinyminutes-docs

Code documentation written as code! How novel and totally my idea!
https://learnxinyminutes.com/
Other
11.53k stars 3.36k forks source link

Angular js - code file not found #5172

Closed sohang3112 closed 1 week ago

sohang3112 commented 2 weeks ago

Code file url is invalid for AngularJS (gives 404 error): both in English page (learnangular.html) and Chinese page (learnangular-cn.html).

sohang3112 commented 2 weeks ago

@adambard BTW how exactly do these code pages work (i.e., where are they stored in the repository??) For example, jquery.js code page exists but I can't find any file named jquery.js in the repository!

verhovsky commented 2 weeks ago

Fixed in https://github.com/adambard/learnxinyminutes-docs/commit/572827b39f7a511b33a4aaa64438960c386343e2 and that commit should also answer your question. The source code is extracted by this code

https://github.com/adambard/learnxinyminutes-site/blob/19e4324b6a3feefff51946230e2471bcb6c4a6a1/config.rb#L254-L269

and the filename it's saved as is the filename: property in the frontmatter (the YAML before the markdown begins in the files in this repository)

sohang3112 commented 1 week ago

@verhovsky For Angularjs english page the problem is fixed but for the chinese page still the same broken code link is showing (even after disabling cache in browser), please check it:

Angularjs Chinese page screenshot

Angualarjs Code page