# Documentation Only Sites


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

## Background

While nbdev is great for authoring software, you may wish to utilize the
power of nbdev for the purposes of documenting existing code, or **use
various utilities of nbdev without having to write a python library**.
For example, you can use the following features of nbdev without
creating a python package:

- Custom [nbdev directives](../explanations/directives.ipynb) such as
  [`#| hide_line`](../explanations/directives.ipynb#hide_line).
- Testing with `nbdev-test`.
- Automated entity linking with
  [doclinks](best_practices.ipynb#reference-related-symbols-with-doclinks).
- Rendering API documentation with [docments and
  show_doc](best_practices.ipynb#document-parameters-with-docments).

## Setup

To setup a documentation only site, you can follow these steps:

1.  Create a nbdev repo the usual way, using `nbdev-new`
2.  Remove library files

``` bash
rm setup.py .github/workflows/test.yaml nbs/00_core.ipynb
```

3.  Remove your library folder (this will be the `lib_path` field in
    `[tool.nbdev]` in `pyproject.toml`):

``` bash
rm -rf <lib_path>
```

## Usage

After setting up your project, you can use various nbdev utilities per
usual:

- `nbdev-preview` for previewing your site
- `nbdev-test` for testing your docs locally
- Custom [nbdev directives](../explanations/directives.ipynb) will be
  available to you (but you must be careful not to use irrelevant ones
  like `#| export`).
- If you created your nbdev docs site on GitHub, GitHub Actions will
  publish your docs for you automatically [as described
  here](../explanations/docs.ipynb#Deploying-Docs-With-GitHub-Actions).
- You can publish your docs on other platforms as described
  [here](../explanations/docs.ipynb#Deploying-Your-Docs-On-Other-Platforms).

## Demo

A minimal example of a documentation-only site is located
[here](https://github.com/hamelsmu/nolib_nbdev).
