diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 0000000..0035810
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,77 @@
+apt-run: &apt-install
+ name: Install apt packages
+ command: |
+ apt update
+ apt install -y graphviz build-essential
+
+docs-install: &docs-install
+ name: Install Python dependencies
+ command: |
+ pip install werkzeug sphinx alabaster invoke python-dateutil sphinx-automodapi nbsphinx ipython
+
+version: 2
+jobs:
+
+ egg-info-27:
+ docker:
+ - image: circleci/python:2.7
+ steps:
+ - checkout
+ - run: python setup.py egg_info
+
+ egg-info-35:
+ docker:
+ - image: circleci/python:3.5
+ steps:
+ - checkout
+ - run: python setup.py egg_info
+
+ egg-info-36:
+ docker:
+ - image: circleci/python:3.6
+ steps:
+ - checkout
+ - run: python setup.py egg_info
+
+ egg-info-37:
+ docker:
+ - image: circleci/python:3.7
+ steps:
+ - checkout
+ - run: python setup.py egg_info
+
+ html-docs:
+ docker:
+ - image: continuumio/miniconda3
+ steps:
+
+ - checkout
+ - run: *skip-check
+ - run: *apt-install
+ - run: *docs-install
+ - run: python setup.py build_sphinx -w
+ - store_artifacts:
+ path: build/sphinx/html/index.html
+
+ - run:
+ name: "Built documentation is available at:"
+ command: DOCS_URL="${CIRCLE_BUILD_URL}/artifacts/${CIRCLE_NODE_INDEX}/${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}/build/sphinx/html/index.html"; echo $DOCS_URL
+
+workflows:
+ version: 2
+
+ egg-info:
+ jobs:
+ - egg-info-27
+ - egg-info-35
+ - egg-info-36
+ - egg-info-37
+
+ documentation:
+ jobs:
+ - html-docs
+
+
+notify:
+ webhooks:
+ - url: https://giles.cadair.com/circleci
\ No newline at end of file
diff --git a/.coveralls.yml b/.coveralls.yml
deleted file mode 100644
index da424c2..0000000
--- a/.coveralls.yml
+++ /dev/null
@@ -1 +0,0 @@
-repo_token: niCbipldEa8bIbuYwWyJqo7082UOtku0w
diff --git a/.gitignore b/.gitignore
index 9bd1819..bc15156 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
__pycache__/
*.py[cod]
MANIFEST
+docs/manual/.ipynb_checkpoints/*
# Distribution / packaging
build/
diff --git a/.pep8speaks.yml b/.pep8speaks.yml
index 6b61688..c6c20d2 100644
--- a/.pep8speaks.yml
+++ b/.pep8speaks.yml
@@ -2,8 +2,5 @@ pycodestyle:
max-line-length: 120 # Default is 79 in PEP8
exclude:
- setup.py
- - ez_setup.py
- - ah_bootstrap.py
- - astropy_helpers/
- docs/conf.py
descending_issues_order: True
diff --git a/.rtd-environment.yml b/.rtd-environment.yml
index 9979374..6e5cb2e 100644
--- a/.rtd-environment.yml
+++ b/.rtd-environment.yml
@@ -8,3 +8,5 @@ dependencies:
- invoke
- python-dateutil
- sphinx-automodapi
+- nbsphinx
+- ipython
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index 4b8a840..3636741 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -12,12 +12,18 @@ sudo: false
env:
matrix:
- PYTHON_VERSION=2.7 SPHINX_VERSION=1.6
- - PYTHON_VERSION=2.7
+ - PYTHON_VERSION=2.7 SPHINX_VERSION=1.7
+ - PYTHON_VERSION=2.7 SPHINX_VERSION=1.8
- PYTHON_VERSION=3.5 SPHINX_VERSION=1.6
- - PYTHON_VERSION=3.5
+ - PYTHON_VERSION=3.5 SPHINX_VERSION=1.7
+ - PYTHON_VERSION=3.5 SPHINX_VERSION=1.8
- PYTHON_VERSION=3.6 SPHINX_VERSION=1.6
- - PYTHON_VERSION=3.6
- - PYTHON_VERSION=3.6 SPHINX_VERSION=dev
+ - PYTHON_VERSION=3.6 SPHINX_VERSION=1.7
+ - PYTHON_VERSION=3.6 SPHINX_VERSION=1.8
+ - PYTHON_VERSION=3.7 SPHINX_VERSION=1.6
+ - PYTHON_VERSION=3.7 SPHINX_VERSION=1.7
+ - PYTHON_VERSION=3.7 SPHINX_VERSION=1.8
+ - PYTHON_VERSION=3.7 SPHINX_VERSION=dev
global:
- LOCALE=default
diff --git a/README.rst b/README.rst
index 1bae24d..a1b092c 100644
--- a/README.rst
+++ b/README.rst
@@ -3,7 +3,7 @@ ABlog for Sphinx
.. image:: https://travis-ci.org/sunpy/ablog.svg?branch=master
:target: https://travis-ci.org/sunpy/ablog
-
+
**Please note that is an official continuation of** `Ahmet Bakan's Ablog Sphinx extension `_.
ABlog is a Sphinx extension that converts any documentation or personal website project into a full-fledged blog with:
@@ -14,6 +14,7 @@ ABlog is a Sphinx extension that converts any documentation or personal website
* `Disqus integration`_
* `Font-Awesome integration`_
* `Easy GitHub Pages deploys`_
+ * `Jupiter Notebook Support for blog posts`_
.. _Atom feeds: http://ablog.readthedocs.org/blog/atom.xml
.. _Archive pages: http://ablog.readthedocs.org/blog/
@@ -21,6 +22,7 @@ ABlog is a Sphinx extension that converts any documentation or personal website
.. _Disqus integration: http://ablog.readthedocs.org/manual/ablog-configuration-options/#disqus-integration
.. _Font-Awesome integration: http://ablog.readthedocs.org/manual/ablog-configuration-options/#fa
.. _Easy GitHub Pages deploys: http://ablog.readthedocs.org/manual/deploy-to-github-pages/
+.. _Jupiter Notebook Support for blog posts: http://ablog.readthedocs.org/manual/deploy-to-github-pages/
.. _installation:
@@ -31,9 +33,14 @@ You can install ABlog using pip_::
pip install -U ablog
+or anaconda_::
+ conda config --add channels conda-forge
+ conda install ablog
+
This will also install `Sphinx `_, Alabaster_, Werkzeug_, and Invoke_ respectively required for building your website, making it look good, generating feeds, and running deploy commands.
.. _pip: https://pip.pypa.io
+.. _anaconda: https://www.anaconda.com/
.. _Werkzeug: http://werkzeug.pocoo.org/
.. _Alabaster: https://github.com/bitprophet/alabaster
.. _Invoke: http://www.pyinvoke.org/
diff --git a/appveyor.yml b/appveyor.yml
index b6e783e..2d11ed6 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -18,6 +18,7 @@ environment:
- PYTHON_VERSION: "2.7"
- PYTHON_VERSION: "3.5"
- PYTHON_VERSION: "3.6"
+ - PYTHON_VERSION: "3.7"
matrix:
fast_finish: true
@@ -41,12 +42,12 @@ test_script:
- ablog build -b latex -T -d .doctrees -w _latex
- ablog build -T -b json
- ablog build -T -b pickle
-# - ps: mkdir test
-# - ps: cd test
-# - ps: echo "ABlog" ABlog Team" "http://ablog.readthedocs.org" | ablog start
-# - ablog build
-# - ps: mkdir -p test
-# - ps: cd test
-# - ps: echo "ablog" "ABlog" "ABlog Team" "http://ablog.readthedocs.org" | ablog start
-# - ps: cd ablog
-# - ablog build
+ - ps: md test
+ - ps: cd test
+ - ps: echo "ABlog" ABlog Team" "http://ablog.readthedocs.org" | ablog start
+ - ablog build
+ - ps: md -p test
+ - ps: cd test
+ - ps: echo "ablog" "ABlog" "ABlog Team" "http://ablog.readthedocs.org" | ablog start
+ - ps: cd ablog
+ - ablog build
diff --git a/docs/conf.py b/docs/conf.py
index 4058a9e..b92a7c8 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -19,6 +19,7 @@ extensions = [
'sphinx.ext.extlinks',
'sphinx_automodapi.automodapi',
'alabaster',
+ 'nbsphinx',
'ablog'
]
@@ -106,6 +107,8 @@ extlinks = {
'pull': ('https://github.com/sunpy/ablog/pull/%s', 'pull request '),
}
+exclude_patterns = ['docs/manual/.ipynb_checkpoints/*']
+
rst_epilog = '''
.. _Sphinx: http://sphinx-doc.org/
.. _Python: http://python.org
diff --git a/docs/index.rst b/docs/index.rst
index 357e9c9..9313e5b 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -73,6 +73,8 @@ you might find `reStructuredText Primer`_ useful. Once you have
content (in ``.rst`` files), you can post *any page* using the
:rst:dir:`post` directive as follows:
+.. _reStructuredText Primer: http://sphinx-doc.org/rest.html
+
.. code-block:: rst
.. post:: Apr 15, 2014
@@ -104,10 +106,6 @@ can find more about configuring and using ABlog:
:format: {title}
:sort:
-
-.. _reStructuredText Primer: http://sphinx-doc.org/rest.html
-
-
.. only:: html
.. image:: https://secure.travis-ci.org/sunpy/ablog.png?branch=devel
diff --git a/docs/manual/images/notebook_cells.png b/docs/manual/images/notebook_cells.png
new file mode 100644
index 0000000..1411a86
Binary files /dev/null and b/docs/manual/images/notebook_cells.png differ
diff --git a/docs/manual/notebook_support.ipynb b/docs/manual/notebook_support.ipynb
new file mode 100644
index 0000000..8f1b483
--- /dev/null
+++ b/docs/manual/notebook_support.ipynb
@@ -0,0 +1,81 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Jupyter Notebook Posting"
+ ]
+ },
+ {
+ "cell_type": "raw",
+ "metadata": {
+ "raw_mimetype": "text/restructuredtext"
+ },
+ "source": [
+ ".. post:: 27 Oct 2018\n",
+ " :author: Nabil\n",
+ " :tags: posting\n",
+ " :category: Manual"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "To add support for Notebooks to your Ablog instance, you need to configure your `docs/conf.py` (or whereever your `conf.py` is located.\n",
+ "\n",
+ "You will need to add\n",
+ "\n",
+ "```\n",
+ " extennsions = [..., 'nbsphinx', ...]\n",
+ " exclude_patterns = ['docs/manual/.ipynb_checkpoints/*'] (To exclude the notebook autosaves)\n",
+ "```\n",
+ "\n",
+ "You will need to install [nbsphinx](https://nbsphinx.readthedocs.io/) either from `Anaconda` or `pip`. You might need to install [ipython](https://ipython.org/) to make sure the notebook can be run."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Within the notebook you need to make sure the cells are in this order: Titlte cell, post cell. So for this notebook, it looks like this: "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "So the information is similar to how you create a normal RST post."
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "Another working example is SunPy's website which runs [Ablog](https://sunpy.org/blog.html). The Pull Request that added support can be found [here](https://github.com/sunpy/sunpy.org/pull/131) and how to link them to a [Binder](https://mybinder.org/) instance [here](https://github.com/sunpy/sunpy.org/pull/134)."
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 3",
+ "language": "python",
+ "name": "python3"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 3
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython3",
+ "version": "3.6.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 2
+}
diff --git a/docs/release/ablog-v0.9-released.rst b/docs/release/ablog-v0.9-released.rst
index 172a528..e500442 100644
--- a/docs/release/ablog-v0.9-released.rst
+++ b/docs/release/ablog-v0.9-released.rst
@@ -50,3 +50,14 @@ ABlog v0.9.2 released
:location: World
Fixed Windows String issue
+
+ABlog v0.9.3 released
+=====================
+
+.. post:: October 30, 2018
+ :author: Nabil
+ :category: Release
+ :location: World
+
+Added example on how to use writing blog posts in Jupyter notebooks.
+Several fixes provived by `anzawatta`, sorry I was late to release these!
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 90417f0..db14fb5 100644
--- a/setup.py
+++ b/setup.py
@@ -53,6 +53,7 @@ setup(
],
provides=['ablog'],
install_requires=['werkzeug', 'sphinx>=1.6', 'alabaster', 'invoke', 'python-dateutil', 'sphinx-automodapi'],
+ extra_requires=['nbsphinx'],
message_extractors={
'ablog': [
('**.html', 'jinja2', None),