Skip to main content

CLI helpers for preparing a Quarto blog.

Project description

qblog

CLI helpers for preparing this Quarto blog.

Commands

qblog-prepare
qblog-install-hooks
qblog-init

Put Markdown article sources in public/md/<name>.md or private/md/<name>.md, then run qblog-prepare. The command writes Quarto-ready files to public/qmd/<slug>.qmd or private/qmd/<slug>.qmd, and copies local images into the matching collection-level public/fig/ or private/fig/ folder. Markdown and QMD image links are rewritten to ../fig/<image>.

For example:

qblog-prepare public/md/my-note.md

Without arguments, qblog-prepare resyncs Markdown files in public/md/ and private/md/. If a source Markdown file is removed, qblog-prepare removes its generated QMD file and managed images unless those images are still used by another source.

Generated QMD files always use the source Markdown file's last modified timestamp, to the second. Hand-written QMD files in public/qmd/ and private/qmd/ are also scanned by qblog-prepare; files without a date field get one based on their last modified timestamp, and all QMD pages are added to the banner manifests. Banner assignments live in public/manifest.json and private/manifest.json; both are tracked because this repository is private. private/qmd/ uses draft: true; the website renders those pages with draft-mode: unlinked, so they are generated without being added to normal listings.

qblog-install-hooks installs the repository's .githooks/pre-push hook in an existing checkout.

qblog-init clones the blog repository, installs the hook, and runs the preparation step.

To create a new blog from this template locally:

qblog-init <repo_name> --title "<web title name>"

<repo_name> is the local folder name and expected GitHub repository name. <web title name> is the website title written to _quarto.yml.

For example:

qblog-init chem-notes --title "Chem Notes"

This creates a local folder named chem-notes, writes Chem Notes as the website title, and derives the GitHub Pages URL https://sky1ove.github.io/chem-notes.

qblog-init uses Lily as the author by default. A newly cloned target starts with fresh local git history instead of keeping this template repository's origin. Pass --site-url or --keep-template-git only when you need to override those defaults.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qblog-0.1.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qblog-0.1.0-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file qblog-0.1.0.tar.gz.

File metadata

  • Download URL: qblog-0.1.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for qblog-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d0ca24fadf16a132b8cd5fe18f378507befe3f56887a8c205968682b94af08a4
MD5 663b4340d443d30d20c09c930a9ca100
BLAKE2b-256 3348b8d42e8947df352b19352d0bf1a1ef9ab76d1bab6973b978a8bc690fae49

See more details on using hashes here.

File details

Details for the file qblog-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: qblog-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for qblog-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b84b70b588c67cb8815a5f8b6cd5c23dc590af007fbeb0d252aaf7d9a6c19b19
MD5 5538cf1c52aefd4a4e26589120d1e797
BLAKE2b-256 63e79dea8f5a2c32dbed2651b6961241fdbb275a42020325664aade83d7db39a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page