Closed KoljaL closed 4 years ago
See https://github.com/picocms/Pico/issues/530#issuecomment-586689852
It's for security reasons, but no one keeps you from changing it:
content|content-sample
# Deny access to internal dirs and files by passing the URL to Pico
RewriteRule ^(config|content|content-sample|lib|vendor)(/|$) index.php [L]
Something like this:
/**
* Triggered after Pico has prepared the raw file contents for parsing
*
* @see DummyPlugin::onContentParsing()
* @see Pico::parseFileContent()
* @see DummyPlugin::onContentParsed()
*
* @param string &$markdown Markdown contents of the requested page
*
* @return void
*/
public function onContentPrepared(&$markdown)
{
// search for image tags and expand the full path to your images in the content folder
}
That should give you an idea.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1:
I went a different way. Jupyter saves the Notebook as Markdown (with nbconvert) and then embed the images as Base64 Url in the file with this js-extension: https://github.com/freeman-lab/embed-images
my last cell in every notebook looks like this:
os.system('jupyter nbconvert --to markdown ' + ipyparams.notebook_name + ' --output Markdown_Files/' + ipyparams.notebook_name[:-6] + '.md')
os.system('embed-images Markdown_Files/' + ipyparams.notebook_name[:-6] + '.md > Markdown_Files/' + ipyparams.notebook_name[:-6] + '_emb.md')
to get the name of the notebook, this is necessary: https://pypi.org/project/ipyparams/
known issues:
if you (re)start the kernen and run the whole notebook for the first time, no file will be saved.
solution:
just run the last cell again
Hi, In our project we want to display notebooks exported from Jupyter on PicoCMS. The structure of the export is always the same:
The image markdowncode inside the .md files looks like this:
![Png](notebook_files/graph.png)
.But that's not how the graphics are displayed.
It would be possible to change all paths before uploading them, but always time-consuming. And we would like to keep the structure.
Why is pico doing this and how can we change it?