pelican-to-sqlite
Create a SQLite database containing data posts from your local pelican files.
How to install
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.
First, install datasette using pip
pip install datasette
Next, install the datasette plugin datasette-publish-vercel using pip
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.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pelican-to-sqlite-0.5.0.tar.gz | 6.9 kB | Without provenance | Details for pelican-to-sqlite-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pelican_to_sqlite-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for pelican_to_sqlite-0.5.0-py3-none-any.whl |
Total release size: 13.8 kB
Release files / pelican-to-sqlite-0.5.0.tar.gz
| Download URL | pelican-to-sqlite-0.5.0.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2976d6a1b410b4eba860f2ea0cc22f78482c3906c287e48e0b69f14f9ec56a8
|
|
BLAKE2b-256 checksum How to use checksums |
226f7d83f21027a80979706b4f963aa52515c3c08f2a57d07b6d62bbb4ed8eb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Release files / pelican_to_sqlite-0.5.0-py3-none-any.whl
| Download URL | pelican_to_sqlite-0.5.0-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df068b3959e502c1e98cba23c9efa1f407280b793d9a98aa24c06ca0b95c18e9
|
|
BLAKE2b-256 checksum How to use checksums |
08ca32f0e27f2cf63901bc855e1ee5fa532635359491d25b1d9aca2393f3e9c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Security for pelican-to-sqlite 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.