Skip to content

Commit af7ceb4

Browse files
author
AoifeHughes
committed
add post-render script for converting .quarto_ipynb files to .ipynb
1 parent 98bf999 commit af7ceb4

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

_quarto.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,24 @@ project:
44
# Change port if it's busy in your system or just remove this line so that It will automatically use any free port
55
port: 4200
66
browser: true
7+
post-render:
8+
- |
9+
echo "Converting .quarto_ipynb files to .ipynb..."
10+
find . -name "*.quarto_ipynb" -type f | while read -r file; do
11+
base="${file%.quarto_ipynb}"
12+
ipynb_file="${base}.ipynb"
13+
site_path="_site${base#.}.ipynb"
14+
15+
# Copy to local directory
16+
cp "$file" "$ipynb_file"
17+
18+
# Copy to _site directory
19+
mkdir -p "$(dirname "$site_path")"
20+
cp "$file" "$site_path"
21+
22+
echo "Created: $ipynb_file and $site_path"
23+
done
24+
echo "Notebook conversion complete!"
725
826
# These cannot be used as variables. They are reserved for the project configuration.
927
website:
@@ -213,9 +231,8 @@ format:
213231
</footer>
214232
ipynb:
215233
execute:
216-
eval: false
217-
echo: true
218-
234+
enabled: false
235+
jupyter: julia-1.11
219236
execute:
220237
echo: true
221238
output: true

0 commit comments

Comments
 (0)