Skip to main content

pelican-to-sqlite

PyPI GitHub changelog Tests License pre-commit.ci status

Create a SQLite database containing data posts from your local pelican files.

How to install

Using uv (recommended)

uv add pelican-to-sqlite

Using pip

pip install pelican-to-sqlite

Usage

Once the plugin has been installed you only need to run make html to create a SQLite database called pelican.db which will be created in the root of your pelican site.

You will need to add a form to your base.html template (or similar template depending on your theme). The form that needs to be added looks like this (assuming you use Tailwind):

<section class="relative h-8">
<section class="absolute inset-y-0 right-10 w-128">
<form
class = "pl-4"
<
action="your-action-link-here"
method="get">
        <label for="site-search">Search the site:</label>
        <input type="search" id="site-search" name="text"
                aria-label="Search through site content">
        <button class="rounded-full w-16 hover:bg-blue-300">Search</button>
</form>
</section>

In the above, your-action-link-here should be substituted for the link that you get from your Vercel hosted instance of datasette.

Deploy using Vercel

There are many options to deploy your SQLite database with datasette. Below describes using Vercel.

Note: The datasette-publish-vercel plugin may have limited maintenance. Consider alternative deployment methods like Datasette Cloud or manual Vercel deployment if you encounter issues.

First, install datasette using uv (or pip)

uv add datasette
# or: pip install datasette

Next, install the datasette plugin datasette-publish-vercel using uv (or pip)

uv add datasette-publish-vercel
# or: pip install datasette-publish-vercel

and the Vercel CLI

Once that's done, run vercel login to login to (or create) an account.

To publish your pelican.db to Vercel just run:

datasette publish vercel my-database.db

There are several options for outputting to Vercel. See the documentation for more details

Using with Datasette

The SQLite database produced by this tool is designed to be browsed using Datasette. See my post Adding Search to My Pelican Blog with Datasette for more details on how I implemented it.

Metadata

Release files for pelican-to-sqlite 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pelican-to-sqlite 0.7.0
File Size Uploaded
pelican_to_sqlite-0.7.0.tar.gz 72.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pelican-to-sqlite 0.7.0
File Interpreter ABI Platform
pelican_to_sqlite-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 81.7 kB

Release files / pelican_to_sqlite-0.7.0.tar.gz

Download URL pelican_to_sqlite-0.7.0.tar.gz
Size 72.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a21faba8072916d4669260928e07797422593b091fb6657f75264bd4d9f3d1e0
BLAKE2b-256 checksum
How to use checksums
733501b3e1d4dc2177e46d1bce607bdd77db847ea6846dcec510d7253ec963c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Release files / pelican_to_sqlite-0.7.0-py3-none-any.whl

Download URL pelican_to_sqlite-0.7.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
889f0b2ae566e583291e764f0f4f80ac3ff72be0ef0b55c08fcd4139b048d891
BLAKE2b-256 checksum
How to use checksums
4da63755e33d80f7738bdb824d85d1a3f1d3b5c1c01dea1f130fc5ec9217ef4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.3

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page