.. post:: Apr 28, 2024
:tags: blog, sphinx
:author: Antoine Tavant
:language: en
New Blog with Sphinx
====================
Following the stepts of `errbufferoverfl `_ and `Chris Holdgraf `_ I'm also changing my blog to use Sphinx.my blog using Hugo to Sphinx.
I'm using the `ablog `_ extension to create the blog posts.
Updates
-------
Compared to the blog mentioned above, I made some changes to the configuration and the installation process.
Using Sphinx design instead of sphinx pannel
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Since some time ago, sphinx-panel is not maintained anymore. I decided to use the `sphinx_design `_ as suggested by the maintainer of sphinx-panel.
Deployment with GitHub Pages and GitHub Actions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I decided to use GitHub Actions to deploy the blog to GitHub Pages. The configuration is in the `.github/workflows/deploy.yml` file.
The blog is deployed to the `gh-pages` branch.
You can see the action on `github `_.
In includes the following steps:
- installation of dependencies
- build the blog
- push the changes to the `gh-pages` branch of the repository
Tips and Tricks
---------------
Using Sphinx-autobuild
^^^^^^^^^^^^^^^^^^^^^^
The usual ``ablog build && ablog serve`` can be replaced by ``sphinx-autobuild . _website``.
This will automatically rebuild the blog when a change is detected.