Documentation for rsyslog is generated with the (Python) Sphinx documentation
processor. Documentation for the rsyslog-doc
project itself is provided
by this README and other documentation linked from this file.
If you are new to rst and Sphinx, see the Sphinx documentation to get started: http://www.sphinx-doc.org/en/stable/contents.html
In the repo you will find a contrib
directory.
Although content in this directory is part of the official rsyslog-doc
repo, the status is different. While other content in this repo is fully
supported by the dev team, content in the contrib
directory is supported
primarily by the contributor who provided it.
Content may range from small one-off scripts to tools for automating builds of the docs. See the contrib README for details.
If you have new things to add to this area, please follow the directions on this page for contributing to the docs and submit your changes as a new Pull Request.
In addition to the directions here, there is also a separate
BUILDS_README.md file for use by rsyslog-doc
team
members. This doc is used as a quick reference for those who regularly
provide dev and official release builds of the documentation.
- Login with a GitHub account
- Fork the official https://github.com/rsyslog/rsyslog-doc repo
- Create a new branch off of the latest
master
branch - Make your changes
- Commit to the new branch in your fork
- Submit a Pull Request (PR) for review (https://github.com/rsyslog/rsyslog-doc/pulls)
- Stop making any changes to your new branch now that you have submitted a
Pull Request for review. Instead, create a new branch from your
master
branch while you wait for feedback from the doc team. - A member of the team will review and offer feedback on your work. After
feedback has been given and you have made all necessary changes, your
PR will be accepted and merged into the official
master
branch. - At this point, delete your branch that you submitted the PR from and start a new one for the next round of work.
For small changes, the work can be done entirely through the GitHub web interface. For larger changes, some familiarity with Git is useful, though some editors such as Atom or Visual Studio Code make interfacing with Git easier for newcomers.
Before you begin your work, you are encouraged to review the existing PRs and open issues so that you can coordinate your work with other contributors.
Please reach out if you have any questions as you work through making your changes.
Tip: If you would like something less complex to get started with, please see issues tagged with good first issue or help wanted
While working on changes to the docs, you are encouraged to seek input from other members of the community. This can be done via the mailing list, here on GitHub by submitting a new issue or (experimentally) by posting a question to Stack Exchange.
- Mailing list: http://lists.adiscon.net/mailman/listinfo/rsyslog
- Stack Exchange (experimental)
These directions assume default installs of Python for Windows and Linux. Because the Sphinx project recommends using Python 2.7, that is what is shown here.
-
You wish to install the
pip
Python package as a standard user, which places installed packages into that user's home directory. Remove the--user
flag if you wish to install system-wide for all users instead. -
You wish to use a virtual environment to install Sphinx and its dependencies into a dedicated environment instead of installing alongside packages that were installed system-wide or to the user's home directory with the
--user
flag. If you wish to install thesphinx
package and all dependent packages for all users of the system, then you will need to run the package installation commands as an elevated user account (e.g.,sudo
,su
or with administrator rights on a Windows system). -
You are running through these steps for the first time. Leave out the steps involving installation of packages and applications if generating an updated copy of the documentation.
The first part of the process is a little different depending on your OS. The later steps are identical, so those steps have been covered in one place.
-
Download the pip installer from https://bootstrap.pypa.io/get-pip.py
-
Install
pip
locally instead of system-widepython ./get-pip.py --user
-
Install
virtualenv
package and create new virtual environmentpython -m pip install virtualenv --user
python -m virtualenv rsyslog-docs-build
source rsyslog-docs-build/bin/activate
-
Install
git
for your distro. Because distros name the package differently, you may need to substitute the name of the package from the examples below with the name of the package for your distro.You will need to install Git in order to clone the project repo, manage your changes and contribute them back for review and eventual inclusion in the project.
Example commands for installing Git:
- Debian/Ubuntu:
apt-get install git-core
- CentOS/RHEL:
yum install git
See the Installing Git chapter from Pro Git 2 for additional examples.
- Debian/Ubuntu:
- Download the pip installer from https://bootstrap.pypa.io/get-pip.py
- Download and install Git for windows from https://git-scm.com/download/win
- Install
pip
locally instead of system-widec:\python27\python get-pip.py --user
- Install
virtualenv
package and create new virtual environmentc:\python27\python -m pip install virtualenv --user
c:\python27\python -m virtualenv rsyslog-docs-build
rsyslog-docs-build\Scripts\activate.bat
- Install
sphinx
package and any other project dependencies in our new virtual environment instead of system-widepip install -r requirements.txt
- Clone the official Git repo
git clone https://github.com/rsyslog/rsyslog-doc.git
- Checkout either the current stable or development (aka, "master") branch
cd rsyslog-doc
git checkout BRANCH_NAME_HERE
- Choose the
v8-stable
branch for coverage of features currently available in the latest stable release - Choose the
master
branch for coverage of upcoming features and fixes
- Choose the
- Optional: If you have previously cloned the repo, run
git pull
to update it with new changes before continuing.
- Generate HTML format
sphinx-build -b html source build
- Generate EPUB format
sphinx-build -b epub source build
- Review generated contents
- Open rsyslog-doc/build/index.html in a browser
- Use Calibre, Microsoft Edge, Okular, Google Play Books or any other EPUB compatible reader to view the rsyslog-doc/build/rsyslog.epub file