[fastpages] GitHub Pages Blog Using Nbdev

This fixed the problem. Thanks.

See https://github.com/fastai/fastpages/blob/master/README.md#front-matter-related-options

So it’s not possible within notebook but only through markdown?

No its the same in a notebook

1 Like

Its too bad I can’t think of a way to make this clearer? Perhaps in the documentation?

I also am not sure how to throw a warning message from this situation.

Anybody know if they have any thoughts, I’ll add more examples in the README

Also I am not sure but I am not able to see local notebook images render on html. Generated markdown for images look identical to test.md so I am not able to understand what might the issue. :thinking:

</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p><img src="/images/copied_from_nb/my_icons/you_read_alot.png" alt=""></p>


V.S.


</div>
</div>
</div>
<div class="cell border-box-sizing text_cell rendered"><div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p><img src="/images/copied_from_nb/my_icons/fastai_logo.png" alt=""></p>

Yet logo is visible but my local image is not.

That’s an edgecase when you’ve already had the containers built with the previous version, without watchdog installed. If they’re not built (as in after you checked out a repo), they’ll build when you first docker-compose up.

Already pushed a PR with a clarification about that.

1 Like

One thing I find helpful is to open developer tools in your browser https://developers.google.com/web/tools/chrome-devtools/open#chrome

Click on “console” and see if you are getting any errors about files not found. You will be able to see what path it is looking for. Make sure you refresh the page after opening the console so you can see if there are any errors. That helps solve 99% of my problems with this kind of thing. Let us know if that reveals anything helpful

2 Likes

It’s unable to find the images given in html: <p><img src="/images/copied_from_nb/my_icons/you_read_alot.png" alt=""></p>

http://0.0.0.0:4000/images/copied_from_nb/my_icons/you_read_alot.png 404 (Not Found)

Is there a file in that directory? Try running the notebook conversion command from DEVELOPMENT.md or saving the notebook and refreshing the server, as the copying of the image needs to be triggered with a conversion of your notebook to a blog post

Also provide a link to your repo if possible with these files

I tried the steps you mentioned but still getting the same issue even though I am able to see the image located under images/copied_from_nb/my_icons/you_read_alot.png relative to my repo.

I also tried rebuilding the docker images but didn’t work. Repo link

@kcturgutlu I’ll DM you to try to resolve this problem so we don’t pollute this thread with too much extreanous information and back and forth. Only thing I ask is when we are able to fix it you writeup your solution somewhere on these forums to share with the community!

1 Like

For those of us that don’t do keygen on the web… :wink:

How to Create Deploy Key on the Command Line

1 Like

The little things in this thread and elsewhere should be collected more densely on (a) how-to / faq / tips+tricks page(s). Even if you read this thread, finding things again is hard.

Another thing is taking confusion out of the docs. Maybe just separate MD and NB sections as a whole, and have the same subtopics in both (because you need the info on the format you use right now, not both at the same time).

Regarding the MD vs NB thing, what also tripped me up was that the ![](imgpath "caption") thing does not work in NB and leads to failures. There should be a warning in the docs.

And I have a hard time getting metadata to work (with MD): the docs say make a list with dashes, the example post has no dashes. If I try to add / change things, the post disappears without any way of diagnosing the problem. There’s a lot of wiggle room for a better UX here. :wink:

Later: And it is official, metadata in MD does not work, at least for me. Tried a NB post and suddenly my metadata is used.

Another one for the docs: very likely if your timezone does not overlap with that of the build machines, your post from “today” is “tomorrow” for the build machine – i.e. your post disappears because not ready for publishing yet. At least that is what I assume as the cause.

@jhermann you should name your file correctly to avoid this let me know if this doesn’t help…perhaps I should subtract more time from the modified date

https://github.com/fastai/fastpages#automatically-convert-notebooks-to-blog-posts

@jhermann saying something doesn’t work without anything else is not that helpful for maintainers, and also can make it harder for other people to find useful information on the forums. May I kindly suggest providing the following minimum information if something doesn’t work:

  • Links to your posts that are not working on GitHub
  • Steps you took to try to troubleshoot (Like seeing the logs in the development environment, when you try to run the blog locally
  • Steps to reproduce the problem

The below statement is again not helpful, as that works here: https://fastpages.fast.ai/fastpages/jupyter/2020/02/21/introducing-fastpages.html#Images-w/Captions, so it is impossible to debug from the statements you are providing and its impossible to tell if this is a user error or something else.

Please don’t take this the wrong way, this is some feedback that might smooth things out as you interact with open source projects. When feedback is not actionable or accompanied by minimal information, it can appear as just complaining ( which I assume is not your goal )

2 Likes

Happy to take a pull request if you might be up for doing the honors of collecting information you have found for an FAQ :wink:

Well, with all the back and forth getting over the initial “make things work” hump it was not that easy to always provide coherent info – during the last hours, I had to navigate out of dark corners and guess a lot on what the system might do or not do.

Anyway, those things that I could solve / find out so far are collected here for now – later on, that can be moved to more visible places.

1 Like

@nok I agree with you. I have implemented this in https://github.com/fastai/fastpages/pull/126

1 Like