diff --git a/source/about/docs.rst b/source/about/docs.rst index 7a71b82..74b1ffe 100644 --- a/source/about/docs.rst +++ b/source/about/docs.rst @@ -5,19 +5,13 @@ Documentation ************* This website includes the :ref:`documentation ` for the latest full release of -novelWriter as a convenience. However, the main documentation page is hosted on ReadTheDocs. The -version hosted there has documentation available for multiple releases of novelWriter, including -for the current development efforts. +novelWriter. This is the main and updated source of documentation. -The "Stable" version of the documentation always points to the latest release, and should be the -same documentation as available on this website. +PDF Manuals +=========== -The "Latest" version is the documentation for the next release (minor or major) of novelWriter, and -may include information that does not match with the version you have installed. +A selection of PDF manuals are available here for download, including for earlier versions of novelWriter: -At the bottom of the left hand menu of the documentation, you can find a small box to change which -version of the documentation to display. As a general rule the last 10 patched releases should be -available in the list. - -| :octicon:`book` `ReadTheDocs: Stable novelWriter Documentation `__ -| :octicon:`book` `ReadTheDocs: Latest novelWriter Documentation `__ +| :download:`novelWriter-2.1.pdf` +| :download:`novelWriter-2.0.pdf` +| :download:`novelWriter-1.6.pdf` diff --git a/source/download/novelWriter-1.6.pdf b/source/about/novelWriter-1.6.pdf similarity index 100% rename from source/download/novelWriter-1.6.pdf rename to source/about/novelWriter-1.6.pdf diff --git a/source/download/novelWriter-2.0.pdf b/source/about/novelWriter-2.0.pdf similarity index 100% rename from source/download/novelWriter-2.0.pdf rename to source/about/novelWriter-2.0.pdf diff --git a/source/download/novelWriter-2.1.pdf b/source/about/novelWriter-2.1.pdf similarity index 99% rename from source/download/novelWriter-2.1.pdf rename to source/about/novelWriter-2.1.pdf index dff0ee0..884cc88 100644 Binary files a/source/download/novelWriter-2.1.pdf and b/source/about/novelWriter-2.1.pdf differ diff --git a/source/docs/index.rst b/source/docs/index.rst index 64b8230..50a5dd1 100644 --- a/source/docs/index.rst +++ b/source/docs/index.rst @@ -6,9 +6,9 @@ Documentation | **Release Version:** 2.1.1 | **Release Date:** Sunday, 5 November 2023 -| **Docs Updated:** Sunday, 5 November 2023 +| **Docs Updated:** Saturday, 11 November 2023 -**PDF:** :download:`novelWriter-2.1.pdf <../download/novelWriter-2.1.pdf>` [ :ref:`Older Versions ` ] +**PDF:** :download:`novelWriter-2.1.pdf <../about/novelWriter-2.1.pdf>` [ :ref:`Older Versions ` ] novelWriter is an open source plain text editor designed for writing novels assembled from many smaller text documents. It uses a minimal formatting syntax inspired by Markdown, and adds a meta diff --git a/source/download/index.rst b/source/download/index.rst index 9085124..b6f444c 100644 --- a/source/download/index.rst +++ b/source/download/index.rst @@ -10,12 +10,6 @@ Downloads help_win -.. toctree:: - :caption: Documentation PDFs - :hidden: - - pdf_docs - This page includes all available packages for the latest release. When pre-release packages for the next version of novelWriter are available, these release packages diff --git a/source/download/pdf_docs.rst b/source/download/pdf_docs.rst deleted file mode 100644 index 9627975..0000000 --- a/source/download/pdf_docs.rst +++ /dev/null @@ -1,11 +0,0 @@ -.. _main_download_pdfs: - -****************** -Documentation PDFs -****************** - -The current documentation for the latest version is available on the :ref:`main_documentation` page. This page contains PDFs for the current and earlier versions. - -| :download:`novelWriter-2.1.pdf` -| :download:`novelWriter-2.0.pdf` -| :download:`novelWriter-1.6.pdf` diff --git a/templates/about_docs.rst b/templates/about_docs.rst new file mode 100644 index 0000000..f9e8c41 --- /dev/null +++ b/templates/about_docs.rst @@ -0,0 +1,13 @@ +.. _main_about_docs: + +************* +Documentation +************* + +This website includes the :ref:`documentation ` for the latest full release of +novelWriter. This is the main and updated source of documentation. + +PDF Manuals +=========== + +A selection of PDF manuals are available here for download, including for earlier versions of novelWriter: diff --git a/tools/docs.py b/tools/docs.py index 9a4b817..f889be6 100644 --- a/tools/docs.py +++ b/tools/docs.py @@ -21,8 +21,9 @@ def __init__(self, target: str, isBranch=False): self._tempDir = ROOT_DIR / "_temp" self._extPath = self._tempDir / "novelWriter" + self._tplPath = ROOT_DIR / "templates" self._dstPath = ROOT_DIR / "source" / "docs" - self._pdfPath = ROOT_DIR / "source" / "download" + self._pdfPath = ROOT_DIR / "source" / "about" self._nwRelease = "Unknown" self._nwDate = "1970-01-01" @@ -136,19 +137,9 @@ def _createPdfPage(self): key = f"{int(bits[0]):02d}.{int(bits[1]):03d}" pdfs.append((key, item.name)) - with open(self._pdfPath / "pdf_docs.rst", mode="w", encoding="utf-8") as of: - of.write( - ".. _main_download_pdfs:\n" - "\n" - "******************\n" - "Documentation PDFs\n" - "******************\n" - "\n" - "The current documentation for the latest version is available on the " - ":ref:`main_documentation` page. This page contains PDFs for the current and " - "earlier versions.\n" - "\n" - ) + with open(self._pdfPath / "docs.rst", mode="w", encoding="utf-8") as of: + of.write((self._tplPath / "about_docs.rst").read_text(encoding="utf-8")) + of.write("\n") for _, pdf in sorted(pdfs, key=lambda x: x[0], reverse=True): of.write(f"| :download:`{pdf}`\n") return @@ -184,8 +175,8 @@ def _rewriteIndex(self, indexFile: Path): "", ( f"**PDF:** :download:`novelWriter-{self._nwMajor}.{self._nwMinor}.pdf " - f"<../download/novelWriter-{self._nwMajor}.{self._nwMinor}.pdf>` " - "[ :ref:`Older Versions ` ]" + f"<../about/novelWriter-{self._nwMajor}.{self._nwMinor}.pdf>` " + "[ :ref:`Older Versions ` ]" ), "", ]