Skip to content

Commit 28c0e9e

Browse files
committed
common stuff: use filenames with a 2 inside, to outline the use of myst=jb2
we end up with a much simpler Makefile
1 parent e8148b2 commit 28c0e9e

File tree

6 files changed

+26
-52
lines changed

6 files changed

+26
-52
lines changed

notebooks/Makefile

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,2 @@
1-
include Makefile.book
2-
include Makefile.style
3-
4-
# should work now
5-
NOTEBOOKS = [0-9]*.py
6-
NBNORMFLAGS = -l1 -L Licence -s2 -S 'IPython.display' -t h1
7-
include Makefile.norm
8-
9-
# derive jb toc from nbhosting
10-
include Makefile.toc
11-
12-
### NOTE
13-
# requires
14-
# pip install pyppeteer
15-
16-
pdf-clean:
17-
rm -rf _build/pdf
18-
19-
pdf-view:
20-
open _build/pdf/book.pdf
21-
22-
.PHONY: pdf pdf-clean pdf-clean
1+
include Makefile.book2
2+
include Makefile.style2
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
# in development, use myst start
2+
13
book:
2-
jupyter-book build .
4+
myst build
35

46
book-clean:
57
rm -rf _build

notebooks/Makefile.style

Lines changed: 0 additions & 28 deletions
This file was deleted.

notebooks/Makefile.style2

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
########## STYLE
2+
# we keep 2 style files:
3+
#
4+
# _static/style_jb2.css: a common file for all projects
5+
# _static/style_local.css: additions specific to this project
6+
#
7+
# this way we can keep the common style file in sync between all projects
8+
# using byte-comparison tools
9+
#
10+
# (it is recommended to create an empty _static/style_local.css
11+
# file if needed, to avoid errors in the build process)
12+
13+
14+
style: _static/style.css
15+
16+
_static/style.css: _static/style_jb2.css _static/style_local.css
17+
(echo '/* autogenerated, DO NOT EDIT ME ! - edit style_jb2.css or style_local.css instead */'; \
18+
cat $^ ) > $@
19+
20+
.PHONY: style

notebooks/_static/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* autogenerated, DO NOT EDIT ME ! - edit style_common.css or style_local.css instead */
1+
/* autogenerated, DO NOT EDIT ME ! - edit style_jb2.css or style_local.css instead */
22
/*
33
* for jupyter-book 2 aka mystmd
44
* with myst.yml: template: book-theme

0 commit comments

Comments
 (0)