fastai / nbdev

Create delightful software with Jupyter Notebooks
https://nbdev.fast.ai/
Apache License 2.0
4.88k stars 488 forks source link

`nbdev_preview` uses doclinks to local server #696

Open seeM opened 2 years ago

seeM commented 2 years ago

Currently, docs rendered locally with nbdev_preview have doclinks to nbdev.fast.ai instead of localhost

jph00 commented 2 years ago

Can you provide some more detail on this @seeM ? I'm not following what it's for.

seeM commented 2 years ago

Currently, docs rendered locally with nbdev_preview have doclinks to nbdev.fast.ai instead of localhost

hdocmsu commented 2 years ago

It may not be directly related to this issue but I am having an issue with the auto-generated hyperlinks of classes. I followed Jeremy's tutorial for nbdev_cards. Everything works beautifully except the hyperlink. For some reason the auto-generated hyperlinks have an additional "nbdev_cards." added to the beginning of file.html.

Specifically, when using Card in the markdown, I would expect the below hyperlink https://hdocmsu.github.io/nbdev_cards/card.html#card

however, the hyperlink I got below has the additional prefix "nbdev_cards." on the card.html https://hdocmsu.github.io/nbdev_cards/nbdev_cards.card.html#card

Any suggestions are very appreciated. Thanks!

hdocmsu commented 2 years ago

One more comment, in nbdev1, I recalled that there is a hyperlink that leads to the source code in github.com. I don't see the link-to-the-source-code in nbdev2. I am not sure if this is intentional or a bug. Thanks!

seeM commented 2 years ago

This is addressed in https://github.com/fastai/nbdev/pull/832

@hdocmsu are you still having an issue with your first question?

The second issue you mentioned is being tracked here: https://github.com/fastai/nbdev/issues/692

hdocmsu commented 2 years ago

Hi @seeM, yes, I still have a problem with my first question. For some reason, there is an extra "nbdev_cards." added to the file.html.

I think the fast.ai/nbdev_cards (https://github.com/fastai/nbdev_cards) also has the same issue with the hyperlink. Here is the hyperlink from 'Card' in the README.md from the repository (https://github.com/fastai/nbdev_cards).

https://fastai.github.io/nbdev-cards/nbdev_cards.card.html#card