If you don't know which attributes of NBViewer you can configure using the config file, run python -m nbviewer -generate-config (or python -m nbviewer -generate-config -config-file="my_custom_name.py") to write a default config file which has all of the configurable options commented out and set to their default values. relative to where the command python -m nbviewer is run, and never an absolute path.) (The location is always a relative path, i.e. You can modify the name and location of the config file that NBViewer looks for using the -config-file command line flag. NBViewer is configurable using a config file, by default called nbviewer_config.py. Config File and Command Line Configuration Publishing, and we'd love to hear from you. We have some work yet to do to support your next big thing in notebook If you'd like to write a new format, open a ticket, or speak up on gitter! Gist provider for an example of customizing theįormats are ways to present notebooks to the user. On a given URL handler that inherits from BaseHandler, overload theĬlient_error_message and re-call it with your message (or None). While you could re-implement upstream HTTP error handling, a smallĬonvenience method is provided for intercepting HTTP errors. See the github providerįor a complex example of providing multiple handlers. If you need custom logic, such as connecting to an API, implementĭefault_handlers. (usually an URI fragment), escape it correctly, and turn it into a "canonical"įor a simple example of rewriting URLs without using a custom API client. Uri_rewrites, which will allow the front page to transform an arbitrary string If you just need to rewrite URLs (or URIs) of another site/namespace, implement Such as those which would require user authentication, will take some work toĪ provider is implemented as a python module, which can expose a few functions: uri_rewrites Some providers are more involved than others, and some, Providers are sources of notebooks and directories of notebooks and directories. The CONTRIBUTING.md fileĮxplains how to set up a development installation and how to run the test suite. If you would like to contribute to the project, please read the CONTRIBUTING.md. You can then just do the modifications you like to the source code and/or the templates then refresh the pages. This will automatically relaunch the server if a change is detected on a python file, and not cache any results. ipynb Quarto will not execute the cells within the notebook by default (the presumption being that you have already executed them while editing the notebook).$ python -m nbviewer -debug -no-cache -host=127.0.0.1 See the documentation on Output Options for additional details. There are many output options available, including options to optionally hide code, warnings, and/or output. As with document front-matter, option names/values use YAML syntax. Note that options must appear at the very beginning of the cell. Here we specify the label and fig-cap options so that the plot generated from the cell can be cross-referenced. Quarto uses leading comments with a special prefix ( #|) to denote cell options. Any valid Pandoc markdown syntax can be included in markdown cells. Note that a Quarto cross-reference ( is included in the markdown. Here’s the underlying code for the markdown cell: See the documentation on Authoring and Output Formats for additional details. There are YAML options to control many other aspects of document rendering. In this example we specify that we want code to appear collapsed by default. Note that you can switch the type of a cell to Raw using the notebook toolbar: The first cell of your notebook should be a Raw cell that contains the document title, author, and any other options you need to specify. You can read more about installing the extension in the Quarto JupyterLab Extension documentation. For example, when the Quarto JupyterLab extension is installed, your Notebook will show rendered previews of elements like Callouts, Divs, Mermaid charts, as well as other Quarto elements (including the document front matter as a title block). The Quarto JuptyerLab extension enables JupyterLab Notebooks which use Quarto markdown to properly display the contents of the markdown cells. Note that the target file (in this case notebook.ipynb) should always be the very first command line argument.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |