Getting Started
Self Hosting
Option 1: Using Docker
- 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
- Clone the repository: git clone https://github.com/MikeMather/publite.me.git
- Update the environment variables in docker-compose.yml
- Run the application: docker-compose up
Option 3: Using a 3rd party service
Fly.io
- Sign up for an account at fly.io and follow the instructions for setting up your account
- Clone the repository: git clone https://github.com/MikeMather/publite.me.git
- Rename the existing
fly.example.toml
tofly.toml
- Run
fly launch
andfly deploy
Option 4: Manual Setup
- Clone the repository: git clone https://github.com/your-username/publite.me.git
- Install dependencies: pip install -r requirements.txt
- Set up environment variables in .env file
- 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.