Nextcloud Documentation
Go to file
John Molakvoæ (skjnldsv) 93a2d131e0
Code blocks colour
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-11-28 12:13:11 +01:00
_ext Add edit on github link to documentation pages 2018-02-03 11:39:36 +01:00
_shared_assets Code blocks colour 2018-11-28 12:13:11 +01:00
admin_manual Fix linking and rst errors on admin manual 2018-11-28 11:48:27 +01:00
build Use github without api 2018-05-16 09:43:22 +02:00
developer_manual Fix linking and rst errors for dev manual 2018-11-28 11:59:09 +01:00
user_manual Cleanup structure and duplicate outdated docs 2018-11-28 10:58:57 +01:00
user_manual_de Cleanup structure and duplicate outdated docs 2018-11-28 10:58:57 +01:00
win32 Add Windows enablers for documentation 2014-01-06 17:00:33 +01:00
.drone.yml Only build master/stable branches 2018-05-16 09:37:55 +02:00
.gitignore Designer 14 update 2018-09-10 10:04:54 +02:00
conf.py Cleanup structure and duplicate outdated docs 2018-11-28 10:58:57 +01:00
COPYING Add CC License 2012-11-28 15:05:13 +01:00
go.php add antivirus-configuration link 2018-07-05 11:00:20 +02:00
index.html Fix design colour and removed dev pdf link 2018-11-28 11:17:01 +01:00
Makefile Test build without pdf 2018-09-10 10:04:55 +02:00
README.rst Merge pull request #829 from nextcloud/design-update 2018-10-23 14:58:17 +02:00
requirements.txt Cleanup structure and duplicate outdated docs 2018-11-28 10:58:57 +01:00
setup.cmd Add Windows enablers for documentation 2014-01-06 17:00:33 +01:00
style_guide.rst Rewrite a couple of small sections, clarify that images cannot have captions. 2017-11-30 17:22:57 -05:00

=======================
Nextcloud Documentation
=======================

Documentation is published on `<https://docs.nextcloud.com>`_.

The `documentation Wiki <https://github.com/nextcloud/documentation/wiki>`_ is
available for tips, tricks, edge cases, and anyone who wants to contribute more
easily, without having to learn Git and Sphinx.

See the `Style Guide <https://github.com/nextcloud/documentation/blob/master/style_guide.rst>`_ for formatting and style conventions.

Manuals
-------

This repository hosts three manuals:

* **Users' Manual**
* **Administration Manual**
* **Developers Manual**

Please work in the appropriate branch: ``stable``-branches are for the respective release (e.g. 12.0 or 13.0), ``master`` is version 14.0.

Please wrap lines at 80 characters.

.. note:: ``configuration_server/config_sample_php_parameters.rst`` is auto-generated from the core
   config.sample.php file; changes to this file must be made in core `<https://github.com/nextcloud/server/tree/master/config>`_

Spelling and Capitalization Conventions
---------------------------------------

As this grows it may be moved to its own page.

* Nextcloud App Store
* synchronize
* Web (Web page, Web site)

License
-------

All documentation in this repository is licensed under the Creative Commons
Attribution 3.0 Unported license (`CC BY 3.0`_).

.. _CC BY 3.0: http://creativecommons.org/licenses/by/3.0/deed.en_US

Style
-----

Source files are written using the `Sphinx Documentation Generator
<http://sphinx.pocoo.org/>`_. The syntax follows the `reStructuredText
<http://docutils.sourceforge.net/rst.html>`_ style, and can also be edited
from GitHub.

Editing
-------

Contributing to the documentation requires a Github account. Make sure you are
working in the correct branch for your version of Nextcloud or client apps.
If your edits pertain to multiple manual versions, be prepared to backport as
needed.

To edit a document, you can edit the .rst files on your local system, or work
directly on Github. The latter is only suitable for small fixes and improvements
because substantial editing efforts can better be controlled on your local PC.

The best way is to install a complete Sphinx build environment and work on your
local PC. You will be able to make your own local builds, which is the fastest
and best way to preview for errors. Sphinx will report syntax errors, missing
images, and formatting errors. The Github preview is not complete and misses
many mistakes. Create a new branch against the master or stable branch you are
editing, make your edits, then push your new branch to Github and open a new PR.

To edit on Github, fork the repository (see top-right of the screen, under
your username). You will then be able to make changes easily. Once done,
you can create a pull request and get the changes reviewed and back into
the official repository.

Building
--------

Linux / OS X
^^^^^^^^^^^^

First, make sure that the following are installed:

* Python 2 (2.6.0 or better, Python 3 is not yet supported!)
* Python Image Library (PIL) - (the package is called something like ``python-pillow``)
* Sphinx (e.g. ``sudo yum install python-sphinx``),
  on Mac: ``sudo easy_install Sphinx``
* Sphinx PHPDomain (e.g. ``sudo easy_install sphinxcontrib-phpdomain``)
* rst2pdf (e.g. ``sudo easy_install rst2pdf``)

...then enter any manual directory, then run ``make html``. The result can
be found in the ``_build/html`` subdirectory.  PDFs can be built with the
``make latexpdf`` command and are found in _build/latex/ directory.

The openSUSE way
~~~~~~~~~~~~~~~~
* sudo zypper in python-Sphinx
* sudo zypper in python-rst2pdf
* sudo zypper in python-sphinxcontrib-phpdomain # requires repository "devel:languages:python"
* sudo zypper in pdfjam   # pull in latexpdf and all of texlive
* sudo zypper in texlive-threeparttable
* sudo zypper in texlive-wrapfig
* sudo zypper in texlive-multirow
* make user-manual-pdf
* okular user_manual/_build/latex/NextcloudUserManual.pdf

The Debian/Ubuntu way
~~~~~~~~~~~~~~~~~~~~~
* sudo apt-get install python-pil
* sudo apt-get install python-sphinx
* sudo apt-get install python-sphinxcontrib.phpdomain
* sudo apt-get install rst2pdf
* sudo apt-get install texlive-fonts-recommended
* sudo apt-get install texlive-latex-extra
* sudo apt-get install texlive-latex-recommended
* sudo apt-get install latexmk
* make user-manual-pdf
* evince user_manual/_build/latex/NextcloudUserManual.pdf

The Arch Linux way
~~~~~~~~~~~~~~~~~~
* sudo pacman -S python2-sphinx
* sudo pacman -S extra/texlive-core
* sudo pacman -S texlive-latexextra
* sudo pip2 install rst2pdf sphinxcontrib-phpdomain
* sudo ln -s /usr/bin/sphinx-build2 /usr/bin/sphinx-build
* make user-manual-pdf
* PDFVIEWER user_manual/_build/latex/NextcloudUserManual.pdf

Windows
^^^^^^^

Running ``setup.cmd`` will install Python 2.7 and install all dependencies.

Enter any manual and clicking the "Build HTML" shortcut will create a HTML
build. Likewise, "Build PDF" will build the PDF using the more lightweight,
but feature-incomplete RST2PDF tool. The results are in ``_build/html`` and
``_build/pdf`` respectively.

Importing Word and OpenDocument files
-------------------------------------

Sometimes, existing documentation might be in Word or LibreOffice documents. To
make it part of this documentation collection, follow these steps:

Prerequisites
^^^^^^^^^^^^^

1. Install Python 2.x
2. Install odt2sphinx (``easy_install odt2sphinx``)
3. Install GCC/clang (`Xcode command line tools`_ required on Mac OS)

Process
^^^^^^^

1. ``doc/docx`` files need to be stored as odt first
2. Run ``odt2sphinx my.docx``
3. Move the resulting ``rst`` files in place and reference them
4. Wrap text lines at 80 chars, apply markup fixes

Icons
^^^^^
To compile and update the icons list in the designer manual, you will also need
1. inkscape
2. sass
3. unzip
4. wget

.. _CC BY 3.0: http://creativecommons.org/licenses/by/3.0/deed.en_US
.. _`Xcode command line tools`: http://stackoverflow.com/questions/9329243/xcode-4-4-and-later-install-command-line-tools