mirror of
https://github.com/vale981/ablog
synced 2025-03-05 09:11:38 -05:00
Merge pull request #27 from nabobalis/master
support for circeci, updated Travis CI, added notebook example
This commit is contained in:
commit
2794f521ee
17 changed files with 223 additions and 43 deletions
77
.circleci/config.yml
Normal file
77
.circleci/config.yml
Normal file
|
@ -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
|
|
@ -1 +0,0 @@
|
||||||
repo_token: niCbipldEa8bIbuYwWyJqo7082UOtku0w
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,6 +2,7 @@
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
MANIFEST
|
MANIFEST
|
||||||
|
docs/manual/.ipynb_checkpoints/*
|
||||||
|
|
||||||
# Distribution / packaging
|
# Distribution / packaging
|
||||||
build/
|
build/
|
||||||
|
|
|
@ -2,8 +2,5 @@ pycodestyle:
|
||||||
max-line-length: 120 # Default is 79 in PEP8
|
max-line-length: 120 # Default is 79 in PEP8
|
||||||
exclude:
|
exclude:
|
||||||
- setup.py
|
- setup.py
|
||||||
- ez_setup.py
|
|
||||||
- ah_bootstrap.py
|
|
||||||
- astropy_helpers/
|
|
||||||
- docs/conf.py
|
- docs/conf.py
|
||||||
descending_issues_order: True
|
descending_issues_order: True
|
||||||
|
|
|
@ -8,3 +8,5 @@ dependencies:
|
||||||
- invoke
|
- invoke
|
||||||
- python-dateutil
|
- python-dateutil
|
||||||
- sphinx-automodapi
|
- sphinx-automodapi
|
||||||
|
- nbsphinx
|
||||||
|
- ipython
|
20
.travis.yml
20
.travis.yml
|
@ -12,26 +12,28 @@ sudo: false
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
- PYTHON_VERSION=2.7 SPHINX_VERSION=1.6
|
- PYTHON_VERSION=2.7 SPHINX_VERSION=1.6
|
||||||
- PYTHON_VERSION=2.7
|
- PYTHON_VERSION=2.7 SPHINX_VERSION=1.8
|
||||||
|
|
||||||
- PYTHON_VERSION=3.5 SPHINX_VERSION=1.6
|
- PYTHON_VERSION=3.5 SPHINX_VERSION=1.6
|
||||||
- PYTHON_VERSION=3.5
|
- PYTHON_VERSION=3.5 SPHINX_VERSION=1.8
|
||||||
|
|
||||||
- PYTHON_VERSION=3.6 SPHINX_VERSION=1.6
|
- PYTHON_VERSION=3.6 SPHINX_VERSION=1.6
|
||||||
- PYTHON_VERSION=3.6
|
- PYTHON_VERSION=3.6 SPHINX_VERSION=1.8
|
||||||
- PYTHON_VERSION=3.6 SPHINX_VERSION=dev
|
|
||||||
|
- PYTHON_VERSION=3.7 SPHINX_VERSION=1.6
|
||||||
|
- PYTHON_VERSION=3.7 SPHINX_VERSION=1.7
|
||||||
|
- PYTHON_VERSION=3.7 SPHINX_VERSION=1.8
|
||||||
|
|
||||||
global:
|
global:
|
||||||
- LOCALE=default
|
- LOCALE=default
|
||||||
- CONDA_CHANNELS="conda-forge"
|
- CONDA_CHANNELS="conda-forge"
|
||||||
- CONDA_DEPENDENCIES="sphinx werkzeug alabaster invoke graphviz"
|
- CONDA_DEPENDENCIES="sphinx werkzeug alabaster invoke graphviz nbsphinx"
|
||||||
- PIP_DEPENDENCIES="sphinx-automodapi"
|
- PIP_DEPENDENCIES="sphinx-automodapi"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- git clone git://github.com/astropy/ci-helpers.git
|
- git clone git://github.com/astropy/ci-helpers.git
|
||||||
- source ci-helpers/travis/setup_conda.sh
|
- source ci-helpers/travis/setup_conda.sh
|
||||||
- if [[ $SPHINX_VERSION == dev ]]; then
|
|
||||||
pip install git+https://github.com/sphinx-doc/sphinx.git;
|
|
||||||
fi
|
|
||||||
- pip install -e .
|
- pip install -e .
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- make test
|
- make tests
|
||||||
|
|
24
Makefile
24
Makefile
|
@ -1,26 +1,28 @@
|
||||||
.PHONY: demo install rebuild release test docs
|
.PHONY: demo rebuild tests
|
||||||
|
|
||||||
demo:
|
demo:
|
||||||
rm -rf demo
|
rm -rf demo
|
||||||
printf "demo\nABlog\nABlog Team\nhttp://ablog.readthedocs.org" | ablog start
|
printf "demo\nABlog\nABlog Team\nhttp://ablog.readthedocs.org" | ablog start
|
||||||
|
|
||||||
install:
|
|
||||||
pip install -U --no-deps --force-reinstall .
|
|
||||||
|
|
||||||
docs:
|
|
||||||
export PYTHONPATH="$(shell pwd)"; echo $$PYTHONPATH; cd docs; ablog build -a -P
|
|
||||||
|
|
||||||
rebuild:
|
rebuild:
|
||||||
cd docs; watchmedo shell-command --patterns='*.rst' --command='ablog build' --recursive
|
cd docs; watchmedo shell-command --patterns='*.rst' --command='ablog build' --recursive
|
||||||
|
|
||||||
release:
|
|
||||||
python setup.py register
|
|
||||||
python setup.py sdist upload
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
cd docs; ablog build -T
|
cd docs; ablog build -T
|
||||||
|
|
||||||
|
test1:
|
||||||
cd docs; ablog build -b latex -T -d .doctrees -w _latex
|
cd docs; ablog build -b latex -T -d .doctrees -w _latex
|
||||||
|
|
||||||
|
test2:
|
||||||
cd docs; ablog build -T -b json
|
cd docs; ablog build -T -b json
|
||||||
|
|
||||||
|
test3:
|
||||||
cd docs; ablog build -T -b pickle
|
cd docs; ablog build -T -b pickle
|
||||||
|
|
||||||
|
test4:
|
||||||
mkdir -p test; cd test; printf "\nABlog\nABlog Team\nhttp://ablog.readthedocs.org" | ablog start; ablog build
|
mkdir -p test; cd test; printf "\nABlog\nABlog Team\nhttp://ablog.readthedocs.org" | ablog start; ablog build
|
||||||
|
|
||||||
|
test5:
|
||||||
mkdir -p test; cd test; printf "ablog\nABlog\nABlog Team\nhttp://ablog.readthedocs.org" | ablog start; cd ablog; ablog build
|
mkdir -p test; cd test; printf "ablog\nABlog\nABlog Team\nhttp://ablog.readthedocs.org" | ablog start; cd ablog; ablog build
|
||||||
|
|
||||||
|
tests: test test1 test2 test3 test4 test5
|
||||||
|
|
|
@ -3,7 +3,7 @@ ABlog for Sphinx
|
||||||
|
|
||||||
.. image:: https://travis-ci.org/sunpy/ablog.svg?branch=master
|
.. image:: https://travis-ci.org/sunpy/ablog.svg?branch=master
|
||||||
:target: https://travis-ci.org/sunpy/ablog
|
:target: https://travis-ci.org/sunpy/ablog
|
||||||
|
|
||||||
**Please note that is an official continuation of** `Ahmet Bakan's Ablog Sphinx extension <https://github.com/abakan/ablog/>`_.
|
**Please note that is an official continuation of** `Ahmet Bakan's Ablog Sphinx extension <https://github.com/abakan/ablog/>`_.
|
||||||
|
|
||||||
ABlog is a Sphinx extension that converts any documentation or personal website project into a full-fledged blog with:
|
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`_
|
* `Disqus integration`_
|
||||||
* `Font-Awesome integration`_
|
* `Font-Awesome integration`_
|
||||||
* `Easy GitHub Pages deploys`_
|
* `Easy GitHub Pages deploys`_
|
||||||
|
* `Jupiter Notebook Support for blog posts`_
|
||||||
|
|
||||||
.. _Atom feeds: http://ablog.readthedocs.org/blog/atom.xml
|
.. _Atom feeds: http://ablog.readthedocs.org/blog/atom.xml
|
||||||
.. _Archive pages: http://ablog.readthedocs.org/blog/
|
.. _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
|
.. _Disqus integration: http://ablog.readthedocs.org/manual/ablog-configuration-options/#disqus-integration
|
||||||
.. _Font-Awesome integration: http://ablog.readthedocs.org/manual/ablog-configuration-options/#fa
|
.. _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/
|
.. _Easy GitHub Pages deploys: http://ablog.readthedocs.org/manual/deploy-to-github-pages/
|
||||||
|
.. _Jupiter Notebook Support for blog posts: http://ablog.readthedocs.org/manual/notebook_support/
|
||||||
|
|
||||||
.. _installation:
|
.. _installation:
|
||||||
|
|
||||||
|
@ -31,9 +33,14 @@ You can install ABlog using pip_::
|
||||||
|
|
||||||
pip install -U ablog
|
pip install -U ablog
|
||||||
|
|
||||||
|
or anaconda_::
|
||||||
|
conda config --add channels conda-forge
|
||||||
|
conda install ablog
|
||||||
|
|
||||||
This will also install `Sphinx <http://sphinx-doc.org/>`_, Alabaster_, Werkzeug_, and Invoke_ respectively required for building your website, making it look good, generating feeds, and running deploy commands.
|
This will also install `Sphinx <http://sphinx-doc.org/>`_, 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
|
.. _pip: https://pip.pypa.io
|
||||||
|
.. _anaconda: https://www.anaconda.com/
|
||||||
.. _Werkzeug: http://werkzeug.pocoo.org/
|
.. _Werkzeug: http://werkzeug.pocoo.org/
|
||||||
.. _Alabaster: https://github.com/bitprophet/alabaster
|
.. _Alabaster: https://github.com/bitprophet/alabaster
|
||||||
.. _Invoke: http://www.pyinvoke.org/
|
.. _Invoke: http://www.pyinvoke.org/
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
import os
|
import os
|
||||||
|
import io
|
||||||
import sys
|
import sys
|
||||||
import glob
|
import glob
|
||||||
import ablog
|
import ablog
|
||||||
|
@ -175,11 +176,11 @@ def ablog_build(builder=None, sourcedir=None, website=None, doctrees=None,
|
||||||
argv.extend([sourcedir, website])
|
argv.extend([sourcedir, website])
|
||||||
if SPHINX_LT_17:
|
if SPHINX_LT_17:
|
||||||
from sphinx import main
|
from sphinx import main
|
||||||
main(argv)
|
sys.exit(main(argv))
|
||||||
else:
|
else:
|
||||||
from sphinx.cmd.build import main
|
from sphinx.cmd.build import main
|
||||||
# As of Sphinx 1.7, the first argument is now no longer ignored
|
# As of Sphinx 1.7, the first argument is now no longer ignored
|
||||||
main(argv[1:])
|
sys.exit(main(argv[1:]))
|
||||||
|
|
||||||
|
|
||||||
@arg('-D', dest='deep', action='store_true', default=False,
|
@arg('-D', dest='deep', action='store_true', default=False,
|
||||||
|
@ -331,7 +332,7 @@ def ablog_post(filename, title=None, **kwargs):
|
||||||
# read the file, and add post directive
|
# read the file, and add post directive
|
||||||
# and save it
|
# and save it
|
||||||
else:
|
else:
|
||||||
with open(filename, 'w', encoding='utf-8') as out:
|
with io.open(filename, 'w', encoding='utf-8') as out:
|
||||||
post_text = POST_TEMPLATE % pars
|
post_text = POST_TEMPLATE % pars
|
||||||
out.write(post_text)
|
out.write(post_text)
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"""post and postlist directives."""
|
"""post and postlist directives."""
|
||||||
|
|
||||||
from __future__ import absolute_import, division, print_function
|
from __future__ import absolute_import, division, print_function
|
||||||
|
import io
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from string import Formatter
|
from string import Formatter
|
||||||
|
@ -655,7 +656,7 @@ def generate_atom_feeds(app):
|
||||||
if not os.path.isdir(parent_dir):
|
if not os.path.isdir(parent_dir):
|
||||||
os.makedirs(parent_dir)
|
os.makedirs(parent_dir)
|
||||||
|
|
||||||
with open(feed_path, 'w', encoding='utf-8') as out:
|
with io.open(feed_path, 'w', encoding='utf-8') as out:
|
||||||
feed_str = feed.to_string()
|
feed_str = feed.to_string()
|
||||||
try:
|
try:
|
||||||
out.write(feed_str.encode('utf-8'))
|
out.write(feed_str.encode('utf-8'))
|
||||||
|
|
17
appveyor.yml
17
appveyor.yml
|
@ -11,13 +11,14 @@ environment:
|
||||||
# See: http://stackoverflow.com/a/13751649/163740
|
# See: http://stackoverflow.com/a/13751649/163740
|
||||||
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci-helpers\\appveyor\\windows_sdk.cmd"
|
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci-helpers\\appveyor\\windows_sdk.cmd"
|
||||||
CONDA_CHANNELS: "conda-forge"
|
CONDA_CHANNELS: "conda-forge"
|
||||||
CONDA_DEPENDENCIES: "sphinx werkzeug alabaster invoke graphviz"
|
CONDA_DEPENDENCIES: "sphinx werkzeug alabaster invoke graphviz nbsphinx"
|
||||||
PIP_DEPENDENCIES: "sphinx-automodapi"
|
PIP_DEPENDENCIES: "sphinx-automodapi"
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
- PYTHON_VERSION: "2.7"
|
- PYTHON_VERSION: "2.7"
|
||||||
- PYTHON_VERSION: "3.5"
|
- PYTHON_VERSION: "3.5"
|
||||||
- PYTHON_VERSION: "3.6"
|
- PYTHON_VERSION: "3.6"
|
||||||
|
- PYTHON_VERSION: "3.7"
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
|
@ -25,6 +26,11 @@ matrix:
|
||||||
platform:
|
platform:
|
||||||
- x64
|
- x64
|
||||||
|
|
||||||
|
before_test:
|
||||||
|
- cinst pandoc
|
||||||
|
- cinst graphviz
|
||||||
|
- set PATH="%PATH%;C:\Program Files (x86)\Pandoc\"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- "git clone git://github.com/astropy/ci-helpers.git"
|
- "git clone git://github.com/astropy/ci-helpers.git"
|
||||||
- "powershell ci-helpers/appveyor/install-miniconda.ps1"
|
- "powershell ci-helpers/appveyor/install-miniconda.ps1"
|
||||||
|
@ -41,12 +47,3 @@ test_script:
|
||||||
- ablog build -b latex -T -d .doctrees -w _latex
|
- ablog build -b latex -T -d .doctrees -w _latex
|
||||||
- ablog build -T -b json
|
- ablog build -T -b json
|
||||||
- ablog build -T -b pickle
|
- 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
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ extensions = [
|
||||||
'sphinx.ext.extlinks',
|
'sphinx.ext.extlinks',
|
||||||
'sphinx_automodapi.automodapi',
|
'sphinx_automodapi.automodapi',
|
||||||
'alabaster',
|
'alabaster',
|
||||||
|
'nbsphinx',
|
||||||
'ablog'
|
'ablog'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -106,6 +107,8 @@ extlinks = {
|
||||||
'pull': ('https://github.com/sunpy/ablog/pull/%s', 'pull request '),
|
'pull': ('https://github.com/sunpy/ablog/pull/%s', 'pull request '),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exclude_patterns = ['docs/manual/.ipynb_checkpoints/*']
|
||||||
|
|
||||||
rst_epilog = '''
|
rst_epilog = '''
|
||||||
.. _Sphinx: http://sphinx-doc.org/
|
.. _Sphinx: http://sphinx-doc.org/
|
||||||
.. _Python: http://python.org
|
.. _Python: http://python.org
|
||||||
|
|
|
@ -73,6 +73,8 @@ you might find `reStructuredText Primer`_ useful. Once you have
|
||||||
content (in ``.rst`` files), you can post *any page* using the
|
content (in ``.rst`` files), you can post *any page* using the
|
||||||
:rst:dir:`post` directive as follows:
|
:rst:dir:`post` directive as follows:
|
||||||
|
|
||||||
|
.. _reStructuredText Primer: http://sphinx-doc.org/rest.html
|
||||||
|
|
||||||
.. code-block:: rst
|
.. code-block:: rst
|
||||||
|
|
||||||
.. post:: Apr 15, 2014
|
.. post:: Apr 15, 2014
|
||||||
|
@ -104,10 +106,6 @@ can find more about configuring and using ABlog:
|
||||||
:format: {title}
|
:format: {title}
|
||||||
:sort:
|
:sort:
|
||||||
|
|
||||||
|
|
||||||
.. _reStructuredText Primer: http://sphinx-doc.org/rest.html
|
|
||||||
|
|
||||||
|
|
||||||
.. only:: html
|
.. only:: html
|
||||||
|
|
||||||
.. image:: https://secure.travis-ci.org/sunpy/ablog.png?branch=devel
|
.. image:: https://secure.travis-ci.org/sunpy/ablog.png?branch=devel
|
||||||
|
|
BIN
docs/manual/images/notebook_cells.png
Normal file
BIN
docs/manual/images/notebook_cells.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
81
docs/manual/notebook_support.ipynb
Normal file
81
docs/manual/notebook_support.ipynb
Normal file
|
@ -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
|
||||||
|
}
|
|
@ -50,3 +50,14 @@ ABlog v0.9.2 released
|
||||||
:location: World
|
:location: World
|
||||||
|
|
||||||
Fixed Windows String issue
|
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!
|
1
setup.py
1
setup.py
|
@ -53,6 +53,7 @@ setup(
|
||||||
],
|
],
|
||||||
provides=['ablog'],
|
provides=['ablog'],
|
||||||
install_requires=['werkzeug', 'sphinx>=1.6', 'alabaster', 'invoke', 'python-dateutil', 'sphinx-automodapi'],
|
install_requires=['werkzeug', 'sphinx>=1.6', 'alabaster', 'invoke', 'python-dateutil', 'sphinx-automodapi'],
|
||||||
|
extra_requires=['nbsphinx'],
|
||||||
message_extractors={
|
message_extractors={
|
||||||
'ablog': [
|
'ablog': [
|
||||||
('**.html', 'jinja2', None),
|
('**.html', 'jinja2', None),
|
||||||
|
|
Loading…
Add table
Reference in a new issue