Moonwalk Jekyll Theme

repository·master·Indexed 19 days ago

https://github.com/abhinavs/moonwalk

A fast, minimalistic Jekyll-based blog theme featuring a clean dark mode and optimizations for both human readers and AI agents. Includes support for GitHub Markdown Alerts, Table of Contents, and agent-friendly plugins like jekyll-markdown-output and jekyll-llms-output for generating llms.txt and Markdown twins of posts.

Tokens
5K
Snippets
19
Records
33
Agent score
59%

What's inside Moonwalk

  1. Soniq features and limitations

    master

    Included Features

    • Retries: Automatic retries with exponential backoff.
    • Scheduling: Supports both cron-style and one-off scheduled jobs.
    • Deduplication: Prevents duplicate jobs using a job key.
    • Dead-letter queue: Stores jobs that have exhausted all retry attempts.
    • Observability: Includes a web dashboard for inspection and Prometheus metrics.

    When to avoid Soniq

    • Extreme Throughput: If you require more than ~10k jobs per second (Redis-backed queues are better for this).
    • Cross-language requirements: If you need workers written in languages other than Python (e.g., Node, Go, Ruby).
    • Complex DAG Orchestration: If you need to manage complex pipelines of dependent jobs (use Airflow or Prefect instead).
  2. How Agent-friendly features work

    master

    Moonwalk is designed for LLM crawlers and agents using two Jekyll plugins:

    1. jekyll-markdown-output: Creates a .md sibling for every post (e.g., /foo.md for /foo) containing only the raw content without theme chrome.
    2. jekyll-llms-output: Generates /llms.txt (index) and /llms-full.txt (concatenated content) following the llmstxt.org spec.

    Configuration

    These are enabled by default in _config.yml:

    plugins:
      - jekyll-markdown-output
      - jekyll-llms-output
    
    markdown_output:
      collections: [posts]
    
    llms_output:
      index:
        collections: [posts]
      full:
        collections: [posts]
        respect_markdown_output: true

    To customize the llms.txt content, create a _data/llms.yml file with title, description, and sections keys.

    Warning: GitHub Pages does not support these plugins. If hosting on GitHub Pages, you must build the site locally or via CI (Actions, Netlify, etc.) and deploy the static output.

  3. Use jekyll-markdown-output to create Markdown twins

    master

    The jekyll-markdown-output plugin generates a clean Markdown version of every rendered post. For a post at /foo.html, it creates a sibling at /foo.md.

    This file contains:

    • A small YAML frontmatter block (title, date, url, summary, tags, category, author).
    • The post's source Markdown with Liquid rendered.

    It contains no HTML layouts, navigation, or theme scripts, making it ideal for agents to fetch directly.

  4. Use jekyll-llms-output to generate llms.txt and llms-full.txt

    master

    The jekyll-llms-output plugin generates two discovery files at your site root:

    1. /llms.txt: A curated index of important pages following the llmstxt.org spec. This acts as a sitemap for LLMs.
    2. /llms-full.txt: A single file containing the concatenated content of all configured collections. This allows an agent to fetch your entire blog in one request.

    Use the llms_output configuration key to specify which collections to include in the index and the full file.

  5. Quickstart with Soniq for Postgres-backed background jobs

    master

    Soniq is a Python library for running background jobs using Postgres instead of a separate broker like Redis. It uses SELECT ... FOR UPDATE SKIP LOCKED for concurrency and LISTEN/NOTIFY for low-latency job pickup.

    To use Soniq:

    1. Initialize the Soniq client with your database_url.
    2. Define jobs using the @app.job() decorator.
    3. Enqueue jobs using await app.enqueue(...).
    4. Run the setup and worker commands via the CLI to finalize the environment.
    from soniq import Soniq
    
    app = Soniq(database_url="postgresql://localhost/myapp")
    
    @app.job()
    async def send_welcome(to: str):
        print(f"Sending welcome email to {to}")
    
    await app.enqueue(send_welcome, to="dev@example.com")
  6. Use GitHub Markdown Alerts in blog posts

    master

    Moonwalk supports GitHub Markdown Alerts, which are styled blockquotes used to highlight specific types of information. To use them, create a blockquote and include a specific identifier in square brackets immediately following the opening > character.

    Supported alert types include:

    • [!NOTE]: Useful information for skimming.
    • [!TIP]: Helpful advice.
    • [!IMPORTANT]: Key information required to achieve a goal.
    • [!WARNING]: Urgent information to avoid problems.
    • [!CAUTION]: Advice regarding risks or negative outcomes.

    Alerts support standard Markdown formatting such as bold text, inline code, and [links]. They can also span multiple paragraphs.

    > [!NOTE]
    > Useful information that users should know, even when skimming content.
    
    > [!TIP]
    > Helpful advice for doing things better or more easily.
    
    > [!IMPORTANT]
    > Key information users need to know to achieve their goal.
    
    > [!WARNING]
    > Urgent info that needs immediate user attention to avoid problems.
    
    > [!CAUTION]
    > Advises about risks or negative outcomes of certain actions.
  7. Enable agent-friendly plugins in Moonwalk

    master

    Moonwalk (v0.2.0+) includes two plugins to make your site readable by LLMs and coding agents: jekyll-markdown-output (creates clean Markdown versions of posts) and jekyll-llms-output (creates llms.txt and llms-full.txt files).

    To enable them, add them to your _config.yml under the plugins key and configure the collection settings as shown below.

    plugins:
      - jekyll-markdown-output
      - jekyll-llms-output
    
    markdown_output:
      collections: [posts]
    
    llms_output:
      index:
        collections: [posts]
      full:
        collections: [posts]
        respect_markdown_output: true
  8. Setup and run Soniq workers

    master

    After writing your Soniq code, you must perform the following steps to prepare the database and start processing jobs:

    1. Initialize Tables: Run soniq setup once to create the necessary Postgres tables for jobs, retries, and dead-letter queues.
    2. Start Worker: Run soniq worker to begin processing the enqueued jobs.

    This approach eliminates the need for a separate broker (like Redis) or a result backend.

    soniq setup
    soniq worker
  9. Run Moonwalk locally on Windows

    master

    To run the Moonwalk theme locally on a Windows machine, you must use Ruby Devkit 3.0.3. Note that Ruby 3.1.x is known to be bugged for this setup and should be avoided.

    Follow these steps:

    1. Install Ruby: Download and install Ruby Devkit 3.0.3 from rubyinstaller.org.
    2. Install Bundler: Open an elevated command prompt (Run as Administrator) and run:
      gem install bundler
    3. Clone the Repository:
      git clone https://github.com/abhinavs/moonwalk
    4. Bootstrap and Start: Navigate to the cloned directory and run the bootstrap and start scripts:
      cd moonwalk
      bin/bootstrap
      bin/start
    5. Access the Site: Once the server starts, the theme will be hosted at http://127.0.0.1:4000.
    gem install bundler
    git clone https://github.com/abhinavs/moonwalk
    cd moonwalk
    bin/bootstrap
    bin/start
  10. Curate your llms.txt index

    master

    Instead of using the auto-generated index, you can provide a hand-curated structure by creating a file at _data/llms.yml. The plugin will use this file verbatim to build your /llms.txt.

    title: Your Site
    description: >
      One paragraph about who you are and what readers
      (human or otherwise) will find here.
    
    sections:
      - heading: Featured Writing
        links:
          - title: My best post
            url: https://example.com/best-post
            description: One line on what it covers
    
      - heading: About
        links:
          - title: About me
            url: https://example.com/about
            description: Background and contact