diff --git a/doc/userguide/Makefile.am b/doc/userguide/Makefile.am index 27124d4e1d..d3407aee7d 100644 --- a/doc/userguide/Makefile.am +++ b/doc/userguide/Makefile.am @@ -2,10 +2,14 @@ if HAVE_SPHINXBUILD man1_MANS = _build/man/suricata.1 html: - $(MAKE) -f Makefile.sphinx html + sysconfdir=$(sysconfdir) \ + localstatedir=$(localstatedir) \ + sphinx-build -b html -d _build/doctrees . _build/html _build/man/suricata.1: - $(MAKE) -f Makefile.sphinx man + sysconfdir=$(sysconfdir) \ + localstatedir=$(localstatedir) \ + sphinx-build -b man -d _build/doctrees . _build/man clean-local: rm -rf $(top_builddir)/doc/userguide/_build diff --git a/doc/userguide/conf.py b/doc/userguide/conf.py index 7bec508d3e..5df33a98d0 100644 --- a/doc/userguide/conf.py +++ b/doc/userguide/conf.py @@ -49,7 +49,7 @@ master_doc = 'index' # General information about the project. project = u'Suricata' -copyright = u'2015, OISF' +copyright = u'2016, OISF' author = u'OISF' # The version info for the project you're documenting, acts as replacement for @@ -111,11 +111,13 @@ todo_include_todos = False # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. if not on_rtd: - #html_theme = 'alabaster' - html_theme = 'sphinx_rtd_theme' - #html_theme = 'classic' - #html_theme = 'default' - #html_theme = 'nature' + # Attempt to use the read the docs theme. + try: + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + except: + html_theme = 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -290,3 +292,11 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False + +rst_epilog = """ +.. |sysconfdir| replace:: %(sysconfdir)s +.. |localstatedir| replace:: %(localstatedir)s +""" % { + "sysconfdir": os.getenv("sysconfdir", "/etc"), + "localstatedir": os.getenv("localstatedir", "/var"), +} diff --git a/doc/userguide/manpages/suricata.rst b/doc/userguide/manpages/suricata.rst index defa47008e..bb8922d4c9 100644 --- a/doc/userguide/manpages/suricata.rst +++ b/doc/userguide/manpages/suricata.rst @@ -191,3 +191,12 @@ OPTIONS change the default log directory:: --set default-log-dir=/var/tmp + +FILES AND DIRECTORIES +--------------------- + +|sysconfdir|/suricata/suricata.yaml + Default location of the Suricata configuration file. + +|localstatedir|/log/suricata + Default Suricata log directory.