Commit 8a46ea70 authored by Ciarán Ainsworth's avatar Ciarán Ainsworth

Created repo and corresponding example site

parent 7349a201
.vscode/*
\ No newline at end of file
layout python $(pythonz locate 3.7.3)
\ No newline at end of file
_build/*
_templates/*
\ No newline at end of file
2.6.2
\ No newline at end of file
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = .
BUILDDIR = _build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.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).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
\ No newline at end of file
/*--Page Layout---------------------------------------------------*/
body {
font-family: Georgia, serif;
font-size: 17px;
color: #839496;
background-color: #002b36;
}
div.body {
background-color: #002b36;
color: #839496;
}
tt,
code {
color: #d30102;
}
/*--Links---------------------------------------------------------*/
a {
color: #b58900;
text-decoration: underline;
}
a:hover {
color: #268bd2;
text-decoration: underline;
}
a:visited {
color: #268bd2;
}
a.reference {
text-decoration: none;
border-bottom: 1px dotted #004B6B;
}
a.reference:hover {
border-bottom: 1px solid #6D4100;
}
/*--Headers-------------------------------------------------------*/
h1 {
color: #b58900;
}
h2,
h3,
h4,
h5,
h6 {
color: #b58900;
}
/*--Blocks----------------------------------------------------------*/
pre {
background-color: #002b36;
color: #839496;
border: 1pt solid #586e75;
padding: 1em;
box-shadow: 5pt 5pt 8pt #073642;
}
span.pre {
background-color: #002b36;
}
div.note {
background-color: #002b36;
color: #b58900;
border: 1px solid #586e75;
}
div.warning {
background-color: #eee8d5;
border: 1px solid #93a1a1;
color: #586e75;
}
/*--Sidebar----------------------------------------------------------*/
div.sphinxsidebar a {
color: #b58900;
text-decoration: none;
border-bottom: 1px dotted #b58900;
}
div.sphinxsidebar a:hover {
border-bottom: 1px solid #cb4b16;
}
div.sphinxsidebar h3 a {
color: #b58900;
}
div.sphinxsidebar p.logo a,
div.sphinxsidebar h3 a,
div.sphinxsidebar p.logo a:hover,
div.sphinxsidebar h3 a:hover {
border: none;
}
div.sphinxsidebar h3,
div.sphinxsidebar h4 {
font-family: Georgia, serif;
color: #b58900;
font-size: 24px;
font-weight: normal;
margin: 0 0 5px 0;
padding: 0;
}
div.sphinxsidebar ul {
color: #b58900;
}
a.headerlink:hover {
color: #b58900;
background: #002b36;
}
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
import alabaster
def setup(app):
app.add_stylesheet('css/custom.css')
# -- Project information -----------------------------------------------------
project = 'Alabaster Solarized Dark'
copyright = '2019, Ciarán Ainsworth'
author = 'Ciarán Ainsworth'
# The full version, including alpha/beta/rc tags
release = '1.0.0'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'alabaster'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
# The name of the Pygments (syntax highlighting) style to use
pygments_style = 'solarized_dark'
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
=============
Configuration
=============
To get your site up and running with
Sphinx solarized dark, you will need to
do the following.
Setting up Dependencies
-----------------------
Check the :doc:`dependencies list <deps>`
for the necessary software. Be sure to use
the same version of Python to install each
one.
Setting up Sphinx
-----------------
To initialise your sphinx site, run ``sphinx-quickstart``
and enter the necessary information. This will generate the
necessary files and folders to build and serve your Sphinx site.
If you are using `ablog <http://ablog.readthedocs.io/>`_, run the
`ablog start` command to get the necessary files and folders.
Create a folder called ``_static`` and another folder within
it called ``css``. Place the ``custom.css`` file from the
`repository <https://gitlab.com/sporiff/alabaster-solarized-dark>`_ in
here.
Editing Configuration
---------------------
In order to use the custom CSS and the `pygments-solarized <https://pypi.org/project/pygments-solarized/>`_
linter, we will need to enter the following values in the ``conf.py`` file.
.. code-block:: python
# Tell the config file to look for a stylesheet in the css folder
def setup(app):
app.add_stylesheet('css/custom.css')
# Tell Pygments to lex using the solarized dark theme
pygments_style = 'solarized_dark'
# Make sure your static path is set
html_static_path = ['_static']
Build the site
--------------
Depending on whether you used Sphinx or Ablog, run ``make html`` or
``ablog build`` respectively. The files should then be built and stored
in the location specified during setup. Open up the ``index.html`` file
to see your site.
============
Dependencies
============
To get this theme working as intended,
you will need the following dependencies:
Mandatory
---------
- `pip <https://pypi.org/project/pip/>`_
- `Sphinx <http://sphinx-doc.org/>`_
- `Alabaster <https://alabaster.readthedocs.io/en/latest/>`_
Optional
--------
- `Pygments <http://pygments.org/>`_ for syntax highlighting
- `pygments-solarized <https://pypi.org/project/pygments-solarized/>`_ for syntax themeing
- `Ablog <http://ablog.readthedocs.io/>`_ if you are using Sphinx for blogging
========
Examples
========
Notes and Warnings
------------------
.. note::
This is a note. It matches the background
but has a slightly clearer colour scheme
.. warning::
Warnings make use of the solarized light
theme to make them stand out
Code
----
Python
^^^^^^
.. code-block:: Python
import os
import sys
import alabaster
def setup(app):
app.add_stylesheet('css/custom.css')
project = 'Alabaster Solarized Dark'
copyright = '2019, Ciarán Ainsworth'
author = 'Ciarán Ainsworth'
release = '1.0.0'
extensions = [
'alabaster'
]
pygments_style = 'solarized_dark'
html_theme = 'alabaster'
html_static_path = ['_static']
CSS
^^^
.. code-block:: css
body {
font-family: Georgia, serif;
font-size: 17px;
color: #839496;
background-color: #002b36;
}
div.body {
background-color: #002b36;
color: #839496;
}
tt,
code {
color: #d30102;
}
Headers
-------
H2
--
H3
^^
H4
**
.. Alabaster Solarized Dark documentation master file, created by
sphinx-quickstart on Thu May 9 22:05:22 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Alabaster Solarized Dark's documentation!
====================================================
.. toctree::
:maxdepth: 2
config
deps
examples
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
@ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
goto end
:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
:end
popd
Sphinx==2.0.1
alabaster==0.7.12
pip==19.1.1
Pygments==2.4.0
3.7
\ No newline at end of file
==============================
Alabaster Solarized Dark Theme
==============================
Custom CSS for Alabaster
------------------------
This CSS is designed to customise `the Alabaster theme <https://alabaster.readthedocs.io/en/latest/>`_
for `Sphinx <http://sphinx-doc.org/>`_. It uses the `Solarized Dark <https://ethanschoonover.com/solarized/>`_
colour scheme for maximum comfort while reading.
This has been tested with Sphinx and `Ablog <https://ablog.readthedocs.io/>`_.
Special features
^^^^^^^^^^^^^^^^
- Full syntax highlighting in solarized-dark colours
- True solarized dark colour theme
- Colours for blocks such as ``.. note::`` and ``.. warning::``
Requirements
------------
To get the most out of this theme, the following is recommended:
- `Pygments <http://pygments.org/>`_ for syntax highlighting
- `pygments-solarized <https://pypi.org/project/pygments-solarized/>`_ for syntax themeing
- `Alabaster <https://alabaster.readthedocs.io/en/latest/>`_
Installation
------------
To set the theme up, place the ``custom.css`` file in a folder called ``css`` within your ``html_static_path``
(usually ``_static``) and add the following to your ``conf.py``
.. code-block:: python
# Tell the config file to look for a stylesheet in the css folder
def setup(app):
app.add_stylesheet('css/custom.css')
# Tell Pygments to lex using the solarized dark theme
pygments_style = 'solarized_dark'
# Make sure your static path is set
html_static_path = ['_static']
Now run ``sphinx build`` or ``ablog build`` (depending on what you're using) and you should see the
CSS take effect.
/*--Page Layout---------------------------------------------------*/
body {
font-family: Georgia, serif;
font-size: 17px;
color: #839496;
background-color: #002b36;
}
div.body {
background-color: #002b36;
color: #839496;
}
tt,
code {
color: #d30102;
}
/*--Links---------------------------------------------------------*/
a {
color: #b58900;
text-decoration: underline;
}
a:hover {
color: #268bd2;
text-decoration: underline;
}
a:visited {
color: #268bd2;
}
a.reference {
text-decoration: none;
border-bottom: 1px dotted #004B6B;
}
a.reference:hover {
border-bottom: 1px solid #6D4100;
}
/*--Headers-------------------------------------------------------*/
h1 {
color: #b58900;
}
h2,
h3,
h4,
h5,
h6 {
color: #b58900;
}
/*--Blocks----------------------------------------------------------*/
pre {
background-color: #002b36;
color: #839496;
border: 1pt solid #586e75;
padding: 1em;
box-shadow: 5pt 5pt 8pt #073642;
}
span.pre {
background-color: #002b36;
}
div.note {
background-color: #002b36;
color: #b58900;
border: 1px solid #586e75;
}
div.warning {
background-color: #eee8d5;
border: 1px solid #93a1a1;
color: #586e75;
}
/*--Sidebar----------------------------------------------------------*/
div.sphinxsidebar a {
color: #b58900;
text-decoration: none;
border-bottom: 1px dotted #b58900;
}
div.sphinxsidebar a:hover {
border-bottom: 1px solid #cb4b16;
}
div.sphinxsidebar h3 a {
color: #b58900;
}
div.sphinxsidebar p.logo a,
div.sphinxsidebar h3 a,
div.sphinxsidebar p.logo a:hover,
div.sphinxsidebar h3 a:hover {
border: none;
}
div.sphinxsidebar h3,
div.sphinxsidebar h4 {
font-family: Georgia, serif;
color: #b58900;
font-size: 24px;
font-weight: normal;
margin: 0 0 5px 0;
padding: 0;
}
div.sphinxsidebar ul {
color: #b58900;
}
a.headerlink:hover {
color: #b58900;
background: #002b36;
}
[build]
base = "Example/Website"
publish = "Example/Website/_build"
command = "make html"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment