|
| 1 | +Deploying Zensical on Read the Docs |
| 2 | +=================================== |
| 3 | + |
| 4 | +.. meta:: |
| 5 | + :description lang=en: Learn how to host Zensical sites on Read the Docs. |
| 6 | + |
| 7 | +Zensical_ is a modern static site generator designed to simplify building and |
| 8 | +maintaining project documentation. It's built by the creators of Material for MkDocs |
| 9 | +and shares the same core design principles and philosophy – batteries included, |
| 10 | +easy to use, with powerful customization options. |
| 11 | + |
| 12 | +Minimal configuration is required to build an existing Zensical project on Read the Docs: |
| 13 | + |
| 14 | +.. code-block:: yaml |
| 15 | + :caption: .readthedocs.yaml |
| 16 | +
|
| 17 | + version: 2 |
| 18 | +
|
| 19 | + build: |
| 20 | + os: ubuntu-24.04 |
| 21 | + tools: |
| 22 | + python: latest |
| 23 | + jobs: |
| 24 | + # We recommend using a requirements file for reproducible builds. |
| 25 | + # This is just a quick example to get started. |
| 26 | + # https://docs.readthedocs.io/page/guides/reproducible-builds.html |
| 27 | + install: |
| 28 | + - pip install zensical |
| 29 | + build: |
| 30 | + html: |
| 31 | + - zensical build |
| 32 | + post_build: |
| 33 | + - mkdir -p $READTHEDOCS_OUTPUT/html/ |
| 34 | + - cp --recursive site/* $READTHEDOCS_OUTPUT/html/ |
| 35 | +
|
| 36 | +.. _Zensical: https://zensical.org/ |
| 37 | + |
| 38 | +Quick start |
| 39 | +----------- |
| 40 | + |
| 41 | +- If you have an existing Zensical project you want to host on Read the Docs, check out our :doc:`/intro/add-project` guide. |
| 42 | +- If you're new to Zensical, check out the official `Getting Started <https://zensical.org/docs/get-started/>`_ guide. |
| 43 | + |
| 44 | +Configuring Zensical and Read the Docs Addons |
| 45 | +--------------------------------------------- |
| 46 | + |
| 47 | +There are some additional steps you can take to configure your Zensical project to work better with Read the Docs. |
| 48 | + |
| 49 | +.. contents:: |
| 50 | + :local: |
| 51 | + :backlinks: none |
| 52 | + |
| 53 | +Set the canonical URL |
| 54 | +~~~~~~~~~~~~~~~~~~~~~ |
| 55 | + |
| 56 | +A :doc:`canonical URL </canonical-urls>` allows you to specify the preferred version of a web page |
| 57 | +to prevent duplicated content. |
| 58 | + |
| 59 | +Set your Zensical `site URL`_ to your Read the Docs canonical URL using a |
| 60 | +:doc:`Read the Docs environment variable </reference/environment-variables>`: |
| 61 | + |
| 62 | +.. code-block:: toml |
| 63 | + :caption: zensical.toml |
| 64 | +
|
| 65 | + [project] |
| 66 | + # Note: variable interpolation is not yet supported in Zensical configuration files, |
| 67 | + # so you can use the explicit value for now. |
| 68 | + site_url = "https://your-project.readthedocs.io/" |
| 69 | +
|
| 70 | +.. _site URL: https://zensical.org/docs/setup/basics/#site_url |
| 71 | + |
| 72 | +Example repository and demo |
| 73 | +--------------------------- |
| 74 | + |
| 75 | +Example repository |
| 76 | + https://github.com/readthedocs/test-builds/tree/zensical |
| 77 | + |
| 78 | +Demo |
| 79 | + https://test-builds.readthedocs.io/en/zensical/ |
| 80 | + |
| 81 | +Further reading |
| 82 | +--------------- |
| 83 | + |
| 84 | +* `Zensical documentation`_ |
| 85 | +* `Markdown syntax guide`_ |
| 86 | + |
| 87 | +.. _Zensical documentation: https://zensical.org/ |
| 88 | +.. _Markdown syntax guide: https://daringfireball.net/projects/markdown/syntax |
0 commit comments