Getting Started

  1. Self host your own blog
  2. Choosing a theme
  3. Code highlighting


Self Hosting

Option 1: Using Docker

  1. Run the container:
docker run -v ./data:/app/data \
  -e DB_PATH=/app/data/blog.db \
  -e MEDIA_ROOT=/app/data/media \
  -e SECRET_KEY=your_secret_key \
  -p 8000:8000 mikemather/publite:latest


Option 2: Using Docker Compose

  1. Clone the repository: git clone https://github.com/MikeMather/publite.me.git
  2. Update the environment variables in docker-compose.yml
  3. Run the application: docker-compose up

Option 3: Using a 3rd party service

Fly.io

  1. Sign up for an account at fly.io and follow the instructions for setting up your account
  2. Clone the repository: git clone https://github.com/MikeMather/publite.me.git
  3. Rename the existing fly.example.toml to fly.toml
  4. Run fly launch and fly deploy

Option 4: Manual Setup

  1. Clone the repository: git clone https://github.com/your-username/publite.me.git
  2. Install dependencies: pip install -r requirements.txt
  3. Set up environment variables in .env file
  4. Run the application: python run.py



Once the server is running, you can visit http://localhost:8000/admin/ to setup your admin account and access your dashboard

Themeing

publite.me comes with a number of pre-defined themes out the box. You can browse screenshots of these themes in the themes gallery. We also encourage adding your own aesthetic by customizing your theme.



Code Highlighting

publite.me does not come with code highlighting styles out-of-the-box, but it's very easy to choose your themes. publite uses the python Pygments library for code highlighting which has customizable themes. The easiest way to choose a theme is to go to this Github repository, choose a theme and copy the CSS into the custom CSS field in the settings page of your blog.

If you want to look at the full list of pygment themes, you can also install the pygments library via pip and run these commands:

pygmentize -L style # to list out all available styles
pygmentize -S <theme name> -f html -a .codehilite > styles.css


Note: You won't see the code highlighting while editing your blog in the markdown editor. You'll only see it once it gets published.