moment / luxon

⏱ A library for working with dates and times in JS
https://moment.github.io/luxon
MIT License
15.41k stars 729 forks source link

Broken link in parsing docs #270

Closed esetnik closed 6 years ago

esetnik commented 6 years ago

Luxon supports a wide range of valid ISO 8601 formats through the fromISO method.

https://github.com/moment/luxon/edit/master/docs/parsing.md

The link should be http://moment.github.io/luxon/docs/class/src/datetime.js~DateTime.html#static-method-fromISO

TomasHubelbauer commented 6 years ago

None of the local links in the docs work. They are probably somehow processed before deployment. So they all work on the site. This is unfortunate, but it's not a bug as you can verify when trying the link online: http://moment.github.io/luxon/docs/manual/parsing.html

esetnik commented 6 years ago

That makes sense thanks for clarifying. I just followed google search results and the github docs were the first result so I didn't realize there was a separate hosted documentation.

TomasHubelbauer commented 6 years ago

I was trying to figure out how to make it so that both GitHub rendered preview and the website could work, but since it's linking to a non-MarkDown file, header/anchor links cannot be used and referring to the methods by line numbers would be unstable. So the current solution is probably the best, even though it's a pity it cannot support the rendered preview.

icambron commented 6 years ago

Yeah, I tried a few times to make that work. I'd love a solution that makes the links work in both places (e.g. an ESDoc plugin that rewrites the links)

tzachshabtay commented 6 years ago

@icambron I don't know how ESDoc works, but you might want to take a look at DocFX: http://dotnet.github.io/docfx/index.html

They added javascript support like a year ago, so I don't know how good it is, but I've been using them to document a c# app, and links work both on the website and on github. Here's an example from my app: An article on the website: https://tzachshabtay.github.io/MonoAGS/articles/customizations.html And on github: https://github.com/tzachshabtay/MonoAGS/blob/master/Docs/articles/customizations.md

Test out the "constructor for a component" link to see that it works fine on both.