File tree Expand file tree Collapse file tree 7 files changed +42
-9
lines changed Expand file tree Collapse file tree 7 files changed +42
-9
lines changed Original file line number Diff line number Diff line change 4141 - name : linkcheck
4242 # https://jupyterbook.org/en/stable/reference/cli.html
4343 run : jupyter-book build --builder linkcheck --warningiserror --nitpick --keep-going .
44- env : {PYTHONPATH: .}
4544 build :
4645 runs-on : ubuntu-latest
4746 steps :
7473 book.tex
7574 # insert PDF cover
7675 curl -fsSLO https://static.premai.io/book/cover.pdf
77- env : {PYTHONPATH: .}
7876 - uses : xu-cheng/latex-action@v3
7977 with :
8078 working_directory : _build/latex
Original file line number Diff line number Diff line change @@ -94,11 +94,13 @@ sphinx:
9494 extra_extensions :
9595 - sphinx_last_updated_by_git
9696 - sphinx_subfigure
97- # custom (local *.py files)
98- - badges
99- - committers
100- - bibliography
97+ local_extensions :
98+ badges : .
99+ committers : .
100+ bibliography : .
101+ prem_theme : .
101102 config :
103+ html_theme : prem_theme
102104 myst_heading_anchors : 4
103105 html_js_files :
104106 - [https://analytics.prem.ninja/js/script.js, {defer : defer, data-domain: book.premai.io}]
Original file line number Diff line number Diff line change 1+ document . addEventListener ( 'DOMContentLoaded' , function ( ) {
2+ /// download whole book PDF
3+ document . querySelectorAll ( '.btn-download-pdf-button' ) . forEach ( a => {
4+ a . onclick = ( ) => window . open ( "/state-of-open-source-ai.pdf" ) ;
5+ } ) ;
6+ } ) ;
Original file line number Diff line number Diff line change @@ -68,9 +68,9 @@ Spot something outdated or missing? Want to start a discussion? We welcome any o
6868- Or instead, manually set up your own Python environment:
6969
7070 ``` sh
71- pip install -r requirements.txt # setup
72- PYTHONPATH=. jupyter-book build --builder dirhtml --all . # build
73- python -m http.server -d _build/dirhtml # serve
71+ pip install -r requirements.txt # setup
72+ jupyter-book build --builder dirhtml --all . # build
73+ python -m http.server -d _build/dirhtml # serve
7474 ```
7575
7676 ```` {admonition} alternative: live rebuilding & serving (experimental)
Original file line number Diff line number Diff line change 1+ from os import path
2+
3+ def setup (app ):
4+ app .add_html_theme ('prem_theme' , path .abspath (path .dirname (__file__ )))
Original file line number Diff line number Diff line change 1+ {% extends "sphinx_book_theme/layout.html" %}
2+ {% block extrahead %}
3+ < meta property ="og:site_name " content ="The State of Open Source AI " />
4+ < meta property ="og:title " content ="{{ title }} " />
5+ < meta property ="og:type " content ="book " />
6+ < meta property ="og:image " content ="https://static.premai.io/book/book-cover.jpg " />
7+ < meta property ="og:url " content ="https://book.premai.io/state-of-open-source-ai/{{ '' if pagename == 'index' else pagename }} " />
8+ < meta property ="og:description " content ="Clarity in the current fast-paced mess of Open Source innovation " />
9+ < meta property ="og:locale " content ="en_GB " />
10+ < meta property ="og:book:author " content ="Prem " />
11+ {%- if last_updated %}
12+ < meta property ="og:book:release_date " content ="{{ last_updated }} " />
13+ {%- endif %}
14+ < meta property ="og:book:tag " content ="open-source " />
15+ < meta property ="og:book:tag " content ="AI " />
16+ < meta property ="og:book:tag " content ="book " />
17+ < meta property ="og:book:tag " content ="ML " />
18+ < meta property ="og:book:tag " content ="MLOps " />
19+ < meta property ="og:book:tag " content ="Jupyter-Book " />
20+ {{ super() }}
21+ {% endblock extrahead %}
Original file line number Diff line number Diff line change 1+ [theme]
2+ inherit = sphinx_book_theme
You can’t perform that action at this time.
0 commit comments