mirror of
https://github.com/fverdugo/XM_40017.git
synced 2025-11-08 20:04:24 +01:00
Attempt to fix iframes
This commit is contained in:
parent
e775f37ce5
commit
15c08580b9
@ -25,10 +25,9 @@ EditURL = "https://github.com/fverdugo/XM_40017/blob/main/notebooks/SCRIPT_NAME.
|
|||||||
```
|
```
|
||||||
|
|
||||||
```@raw html
|
```@raw html
|
||||||
<iframe id="notebook" src="SCRIPT_NAME" style="width:100%;height:1000px;></iframe>
|
<iframe id="notebook" src="SCRIPT_NAME_src" style="width:100%;height:1000px;></iframe>
|
||||||
```
|
```
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#<script>
|
#<script>
|
||||||
# document.addEventListener('DOMContentLoaded', function(){
|
# document.addEventListener('DOMContentLoaded', function(){
|
||||||
# var myIframe = document.getElementById("notebook");
|
# var myIframe = document.getElementById("notebook");
|
||||||
@ -36,6 +35,7 @@ EditURL = "https://github.com/fverdugo/XM_40017/blob/main/notebooks/SCRIPT_NAME.
|
|||||||
#});
|
#});
|
||||||
#</script>
|
#</script>
|
||||||
|
|
||||||
|
|
||||||
function convert_embedded_img_to_base64(notebook_path)
|
function convert_embedded_img_to_base64(notebook_path)
|
||||||
doc = open(io->read(io, String), notebook_path)
|
doc = open(io->read(io, String), notebook_path)
|
||||||
# Regex matching: extract filename and base64 code
|
# Regex matching: extract filename and base64 code
|
||||||
@ -104,10 +104,10 @@ for filepath in notebook_files
|
|||||||
convert_embedded_img_to_base64(filepath)
|
convert_embedded_img_to_base64(filepath)
|
||||||
filename_with_ext = splitpath(filepath)[end]
|
filename_with_ext = splitpath(filepath)[end]
|
||||||
filename = splitext(filename_with_ext)[1]
|
filename = splitext(filename_with_ext)[1]
|
||||||
pth = mkpath(joinpath(repo_root,"docs","src","notebooks",filename))
|
pth = mkpath(joinpath(repo_root,"docs","src","notebooks",filename*"_src"))
|
||||||
create_md_nb_file(filename)
|
create_md_nb_file(filename)
|
||||||
convert_notebook_to_html("docs/src/notebooks/$filename_with_ext", output_dir=pth, output_name = "index")
|
convert_notebook_to_html("docs/src/notebooks/$filename_with_ext", output_dir=pth, output_name = "index")
|
||||||
modify_notebook_html("docs/src/notebooks/$(filename)/index.html")
|
modify_notebook_html("docs/src/notebooks/$(filename)_src/index.html")
|
||||||
end
|
end
|
||||||
|
|
||||||
makedocs(;
|
makedocs(;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user