mirror of
https://github.com/vale981/ablog
synced 2025-03-04 08:41:40 -05:00
support for circeci, updated Travis CI, added notebook example
This commit is contained in:
parent
fe83a01c09
commit
d2d05ef74f
14 changed files with 206 additions and 22 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__/
|
||||
*.py[cod]
|
||||
MANIFEST
|
||||
docs/manual/.ipynb_checkpoints/*
|
||||
|
||||
# Distribution / packaging
|
||||
build/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -8,3 +8,5 @@ dependencies:
|
|||
- invoke
|
||||
- python-dateutil
|
||||
- sphinx-automodapi
|
||||
- nbsphinx
|
||||
- ipython
|
14
.travis.yml
14
.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
|
||||
|
|
|
@ -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 <https://github.com/abakan/ablog/>`_.
|
||||
|
||||
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 <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
|
||||
.. _anaconda: https://www.anaconda.com/
|
||||
.. _Werkzeug: http://werkzeug.pocoo.org/
|
||||
.. _Alabaster: https://github.com/bitprophet/alabaster
|
||||
.. _Invoke: http://www.pyinvoke.org/
|
||||
|
|
19
appveyor.yml
19
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
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
|
||||
|
||||
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'],
|
||||
install_requires=['werkzeug', 'sphinx>=1.6', 'alabaster', 'invoke', 'python-dateutil', 'sphinx-automodapi'],
|
||||
extra_requires=['nbsphinx'],
|
||||
message_extractors={
|
||||
'ablog': [
|
||||
('**.html', 'jinja2', None),
|
||||
|
|
Loading…
Add table
Reference in a new issue