Skip to content

Commit

Permalink
Added checklinks to Makefile and adjusted settings in conf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sjentsch committed Jan 10, 2023
1 parent a2323c4 commit 510c662
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 26 deletions.
37 changes: 21 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXPROJ = lsjDocs
SOURCEDIR = .
BUILDDIR = _build
override LANG = en

# Put it first so that "make" without argument is like "make help".
help:
Expand All @@ -16,25 +18,28 @@ help:

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = jamoviDocs
SOURCEDIR = .
BUILDDIR = _build
clean:
-rm -rf $(BUILDDIR)/*

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
html:
@$(SPHINXBUILD) -b html -D language=${LANG} . $(BUILDDIR)/html/${LANG}

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
gettext:
@$(SPHINXBUILD) -b gettext . $(BUILDDIR)/gettext

checklinks:
@$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) . $(BUILDDIR)/linkcheck

htmlhelp:
@echo "Not permitted."

devhelp:
@echo "Not permitted."

qthelp:
@echo "Not permitted."

%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
34 changes: 24 additions & 10 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
# -- Project information -----------------------------------------------------
project = u'jamovi'
slug = re.sub(r'\W+', '-', project.lower())
author = u'The section authors, The jamovi project, and Sebastian Jentschke (curating this documentation)'
copyright = u'2016-2022, ' + author + '. This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.'
copyright = u'2016-2023, The section authors, The jamovi project, and Sebastian Jentschke (curating this documentation). This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
Expand All @@ -40,6 +39,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autosectionlabel',
# 'sphinx.ext.imgmath',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
Expand Down Expand Up @@ -74,6 +74,9 @@
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'default'

# True to prefix each section label with the name of the document it is in, followed by a colon.
# For example, index:Introduction for a section called Introduction that appears in document index.rst.
autosectionlabel_prefix_document = True

# -- Options for HTML output -------------------------------------------------
# Customize the "best image" order for the StandaloneHTMLBuilder class.
Expand Down Expand Up @@ -284,7 +287,7 @@

# If given, this must be the name of an image file (relative to the configuration directory) that
# is the logo of the docs. It is placed at the top of the title page. Default: None.
#latex_logo = None
latex_logo = '_images/header-logo.svg'

# If true, the topmost sectioning unit is parts, else it is chapters. Default: False.
latex_use_parts = False
Expand Down Expand Up @@ -344,23 +347,22 @@

# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'jamoviDocs', u'Documentation for jamovi', [author], 1),
(master_doc, 'jamoviDocs', u'Documentation for jamovi', u'The jamovi project', 1),
]

# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author, dir menu entry, description, category)
# (source start file, target name, title, author, dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'jamoviDocs', u'Documentation for jamovi', [author], 'jamoviDocs', 'free and open statistical software to bridge the gap between researcher and statistician', 'Mathematics'),
(master_doc, 'jamoviDocs', u'Documentation for jamovi', u'The jamovi project', 'jamoviDocs', 'free and open statistical software to bridge the gap between researcher and statistician', 'Mathematics'),
]

# -- Options for Sphinx extensions ----------------------------------------
imgmath_image_format = 'svg'

# -- Lanaguage chooser ----------------------------------------------------

# -- Lower-left roll-up menu ----------------------------------------------
try:
html_context
except NameError:
Expand All @@ -377,12 +379,24 @@
base_path = os.path.abspath('.') + '/_build/html'
else:
base_path = ''


html_context['display_lower_left'] = True

html_context['current_language'] = language
languages = sorted([lang.name for lang in os.scandir('_locale') if (lang.is_dir() and lang.name != 'pot')])
html_context['languages'] = [('en', base_path + '/en')]
for lang in languages:
html_context['languages'].append((lang, base_path + '/' + lang))

html_context['display_version'] = False
current_version = 'latest'
html_context['current_version'] = current_version
html_context['version'] = current_version

html_context['downloads'] = list()
html_context['downloads'].append(('PDF', '/' + language + '/' + current_version + '/' + project + '-docs_' + language + '_' + current_version + '.pdf'))
html_context['downloads'].append(('epub', '/' + language + '/' + current_version + '/' + project + '-docs_' + language + '_' + current_version + '.epub'))

html_context['display_github'] = False
html_context['last_updated'] = False
html_context['commit'] = False

0 comments on commit 510c662

Please sign in to comment.