Metadata-Version: 2.4
Name: solveblog
Version: 0.0.1
Author-email: Rens <rd@answer.ai>
License: Apache-2.0
Project-URL: Repository, https://github.com/AnswerDotAI/solveblog
Project-URL: Documentation, https://AnswerDotAI.github.io/solveblog/
Keywords: nbdev
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: python-fasthtml
Requires-Dist: fastcore
Requires-Dist: monsterui
Requires-Dist: mistletoe
Requires-Dist: fastlite
Dynamic: license-file

# Solveblog


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

Solveblog provides the easiest way to build a blog in solveit. You can
edit your dialogs in solveit and they’ll appear in your blog
immediately.

Markdown messages are shown as regular text. Code, Prompt, and Raw
messages and their outputs are presented in nicely formatted fences.

## Getting started

In [SolveIt](https://solve.it.com):

1.  Create an empty dialog in a new folder for your blog project
2.  Run `!pip install solveblog` to install this package
3.  Run
    [`solveblog_new()`](https://AnswerDotAI.github.io/solveblog/core.html#solveblog_new)
    with your information:

``` py
from solveblog import * 
solveblog_new(
    name='Your Name', # Your name
    port=8000,        # Port to serve on
    email='',         # Your email (optional)
    description='',   # RSS feed description (optional)
    github='',        # GitHub handle (optional)
    twitter='',       # Twitter/X handle (optional)
    linkedin='',      # LinkedIn handle (optional)
)
```

4.  Run `!solveblog` to serve your blog. The url will be printed
    immediately after running the command

## Writing posts

You can add your own posts by adding them to `public/posts/`. Posts can
be markdown files (`.md`) or solveit dialogs (`.ipynb`). Posts are
expected to start with metadata as yaml frontmatter. In solveit dialogs
these are expected to be as the first message (`raw` format). You can
find an example post in `public/posts/` after running
[`solveblog_new()`](https://AnswerDotAI.github.io/solveblog/core.html#solveblog_new).

``` yaml
---
title: Test Notebook Post
date: 2026-04-05
tags:
  - test
---
```

## Writing pages

You can add your own pages by adding them to `public/pages/`. Pages can
also be markdown files (`.md`) or solveit dialogs (`*.ipynb`). Page
filenames are split on underscore (`_`) and the prefix is used as the
sorting key. You can find an example `1_about.ipynb` page after running
[`solveblog_new()`](https://AnswerDotAI.github.io/solveblog/core.html#solveblog_new).

## Autorun

If you run `solveblog` in a terminal window it’ll run until you close
the tab. To keep it running you might want to create a dialog in the
AUTORUN folder (create it if it doesn’t exist). Dialogs in that folder
will automatically run upon instance start, and are exempted from idle
shutdown. In other words: they’ll keep running. In that dialog put a
code message with the following:

``` py
!cd <your-project-dir> && solveblog
```

## Custom domains

SolveIt supports custom domains. To make use of this feature:

1.  Go to your instance settings menu in the SolveIt dashboard, and
    follow the instructions to update the domain:port mapping.
2.  Update`solveblog_settings.py` with the chosen port.
3.  Configure the DNS of your custom domain to point to `solve.it.com`
    (see below)

### DNS setup

**For subdomains** (e.g., `app.example.com`): Create a CNAME record
pointing to `solve.it.com`.

**For apex/root domains** (e.g., `example.com`): Standard CNAME records
won’t work. You need a provider that supports CNAME flattening or ALIAS
records:

| Provider      | Record Type                    |
|---------------|--------------------------------|
| Cloudflare    | CNAME (auto-flattened at apex) |
| AWS Route 53  | ALIAS                          |
| Azure DNS     | Alias                          |
| DNS Made Easy | ANAME                          |
| DNSimple      | ALIAS                          |
| Namecheap     | ALIAS                          |
| Porkbun       | ALIAS                          |

> [!TIP]
>
> We recommend **Cloudflare** for DNS—just create a CNAME at the apex
> and it handles flattening automatically.

> [!WARNING]
>
> GoDaddy does not support CNAME flattening. Use a subdomain or switch
> DNS providers.

DNS changes can take up to 48 hours to propagate, though they often take
effect much sooner.

## Credits

Inspired by the beautiful personal website of Jack Hogan:
[jackhogan.net](jackhogan.net)
