Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert content and switch from jekyll to sphinx #38

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy Sphinx to GitHub Pages

on:
push:
branches: ["main", "master"]

pull_request:
types:
["opened", "reopened", "synchronize"]

workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Set up Python
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: 0.4.x
- name: Add dependencies, build site
run: |
uv venv
uv sync --all-extras
make html
- name: Set up Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'build/html'

# deploy:
# runs-on: ubuntu-latest
# needs: build
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# steps:
# - name: Deploy to GitHub Pages
# id: deployment
# if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
# uses: actions/deploy-pages@v4
#
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
_site
Gemfile.lock
build/*
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
3 changes: 0 additions & 3 deletions Gemfile

This file was deleted.

20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= uv run python -m sphinx.cmd.build
SOURCEDIR = source
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)
13 changes: 0 additions & 13 deletions README.md

This file was deleted.

35 changes: 35 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Website for rst2pdf
===================

This repo holds the website content for https://rst2pdf.github.io.

Contributing
------------

To contribute to this repo, make sure that your master branch is up to
date and create a new branch from there.

The website content is in ``source/``.

Develop locally
~~~~~~~~~~~~~~~

This Python-based project uses `uv <https://docs.astral.sh/uv/>`__ and
`make <https://www.gnu.org/software/make/>`__, so install those first if
you don’t have them already.

1. Install dependencies

::

uv sync

2. Build the site

::

make html

The output files are in the ``build/`` directory as HTML.

3. (optional) Preview the files with ``python -m http.server``.
12 changes: 0 additions & 12 deletions _config.yml

This file was deleted.

10 changes: 0 additions & 10 deletions assets/css/style.scss

This file was deleted.

66 changes: 0 additions & 66 deletions examples.md

This file was deleted.

129 changes: 0 additions & 129 deletions index.md

This file was deleted.

13 changes: 13 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[project]
name = "rst2pdf-github-io"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"furo>=2024.8.6",
"rst2pdf>=0.102",
"sphinx-copybutton>=0.5.2",
"sphinx-external-toc>=1.0.1",
"sphinx>=8.1.3",
]
Binary file added source/_ext/__pycache__/noop.cpython-312.pyc
Binary file not shown.
Loading