Closed fredcallaway closed 6 years ago
Thanks for the PR!
@fredcallaway Great work! Just a potential issue: I have to change
target_dir = os.path.dirname(filepath).split('content/')[1]
to
target_dir = os.path.dirname(filepath).split('content')[1]
written in markup.py
in order to make it work manually.
Maybe there is a more robust way to handle the path string handling.
Maybe using os.path.basename
?
I changed this a little bit to support any path to write on using a variable. Check the readme if you are interested.
@danielfrg Thanks for the work, it become very flexible and work like a charm👍
Just a quick thought:
Although one can check the Pelican documentation to see how ARTICLE_SAVE_AS
work and set their own IPYNB_NB_SAVE_AS
, it would be easier for people to understand how it work and customize their IPYNB_NB_SAVE_AS
if there is a default value.
Something like
IPYNB_NB_SAVE_AS = 'notebooks/{slug}.ipynb'
in the documentation.
Thanks for the PR. I like the idea a lot.
Can you make a small change to make the notebook go to the same path as the output
*.html
file of the article instead ofoutput/notebook
I feel thats a more sane default.