[fastpages, nbdev] Can I export modules when using fastpages?

I am wondering, I will probably create few notebook posts in fastpages that all relate to one another. I know it is possible with nbdev to export code, so I am wondering if that is possible as well in fastpages?

I get that nbdev code is run in the github actions, but can I export locally to include in other notebooks?

Sorry if this makes no sense, I just tried out nbdev last week and found fastpages this week and I am wondering if I can maintain both in the same repo.

I suppose you can, yes. You can have .py files in the _notebooks folder so you could do this theoretically.

Couple of question:

  • If I add a settings.ini for nbdev in the root, will that cause some conflict with fastpages?
  • Can I through make, docker-compose or something else run nbdev commands, or should I pip install nbdev?

No it won’t conflict
You can just run nbdev locally through virtualenv or conda

Thanks. I noticed that if I create a settings.ini in the root of fastpages, it gets overwritten when I run

$ make server

with the settings.ini located in the _action_files.

Is it OK to change the _action_files/settings.ini file with the nbdev changes I want, or should I leave that as is and just restore the root file when local jekyll overwrites it? I haven’t looked into what the GitHub action expects of the files in the _action_files so I’m not comfortable changing them without asking this first :smiley:

oh yeah it does get copied over when developing locally. Hmm I am not sure what the workaround might be, perhaps you have to point nbdev at a differently named settings.ini