Isso Documentation

repository·master·Indexed 26 days ago

https://github.com/isso-comments/isso

Isso is a lightweight, open-source commenting server written in Python and JavaScript, designed as a drop-in replacement for Disqus. It features a SQLite backend, Markdown support for user comments, and tools for importing data from Disqus and WordPress. The system can be deployed via pip or Docker and supports integration with various static site generators and CMS platforms including Hugo, Ghost, Jekyll, and Grav.

Tokens
18K
Snippets
55
Records
112
Agent score
90%

What's inside Isso

  1. Overview of Isso features

    master

    Isso is a lightweight, Python and JavaScript-based commenting server designed as a drop-in replacement for Disqus. Key features include:

    • Markdown Support: Users can write comments in Markdown. Users can edit or delete their own comments (default window is 15 minutes).
    • SQLite Backend: Uses SQLite for storage, optimized for comment data.
    • Migration Tools: Supports importing comments from Disqus and WordPress.
    • Lightweight Client: A single 65kB (20kB gzipped) JavaScript file for embedding.
  2. Run the Isso development server

    master

    After installing Isso from source, you can run a development server locally. The server will be available at localhost:8080. For convenience, the development version uses embed.dev.js with source maps, which allows for easier debugging in browser developer tools (e.g., showing actual source code lines in console traces).

    To start the server, activate your virtual environment and run the isso command with the development configuration file.

    $ virtualenv --download .venv
    $ source .venv/bin/activate
    (.venv) $ isso -c contrib/isso-dev.cfg run
  3. Release a new version of Isso

    master

    To release a new version of Isso, follow these steps to ensure tests pass, version metadata is updated, and the package is uploaded to PyPI:

    1. Run tests: make test
    2. Update the version number in setup.py and CHANGES.rst.
    3. Commit the version changes: git commit -m "Preparing ${VERSION}" setup.py CHANGES.rst (replace ${VERSION} with your actual version).
    4. Tag the release: git tag -as ${VERSION}.
    5. Initialize the environment: make init all.
    6. Build the source distribution: python3 setup.py sdist.
    7. Upload to PyPI using twine: twine upload --sign dist/isso-${VERSION}.tar.gz.
    make test
    # Update setup.py and CHANGES.rst
    git commit -m "Preparing ${VERSION}" setup.py CHANGES.rst
    git tag -as ${VERSION}
    make init all
    python3 setup.py sdist
    twine upload --sign dist/isso-${VERSION}.tar.gz
  4. Import comments from external systems using generic JSON format

    master

    You can migrate comments from other systems into Isso by creating a JSON dump that follows a specific schema.

    JSON Schema Requirements

    The file must be a JSON array containing thread objects. Each thread object must include:

    • id: A unique string representing the thread (e.g., the article URL). Note that this can be overridden on the client side using data-isso-id.
    • title: The title of the thread.
    • comments: A list of comment objects, each containing:
      • id: An integer (unique within the thread) used for ordering.
      • author: The author's name.
      • email: The author's email.
      • website: The author's website.
      • remote_addr: The author's IP address.
      • created: A timestamp in %Y-%m-%d %H:%M:%S format.
      • text: The comment content.

    Import Command

    Once your JSON file is prepared, use the import command with the -t generic flag:

    ~> isso -c /path/to/isso.cfg import -t generic comment-dump.json
  5. Configure and run Isso with a configuration file

    master

    Isso uses an INI-style text file for configuration. You can specify a custom configuration file using the -c flag or by setting the ISSO_SETTINGS environment variable.

    A basic configuration requires a [general] section with a dbpath and a host, and a [server] section with a listen address.

    [general]
    dbpath = /var/lib/isso/comments.db
    host = https://example.tld/
    
    [server]
    listen = http://localhost:1234/
    # Using the -c flag
    $ isso -c /path/to/isso.cfg
    
    # Using the ISSO_SETTINGS environment variable
    $ env ISSO_SETTINGS=/path/to/isso.cfg$ isso
  6. Configure Isso with a Sub-URI

    master

    To avoid CORS issues and prevent privacy-protecting browser extensions from blocking comments, you can run Isso on the same domain as your website using a sub-URI (e.g., /isso).

    When using Nginx as a reverse proxy, you must set the X-Script-Name header to your chosen sub-URI path so Isso can correctly handle routing.

    server {
        listen       [::]:80;
        listen       [::]:443 ssl;
        server_name  example.tld;
        root         /var/www/example.tld;
    
        location /isso {
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Script-Name /isso;
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_pass http://localhost:8080;
        }
    }
  7. Get started with Isso

    master

    To begin using Isso, follow these steps in order:

    1. Install Isso: Refer to the installation documentation to set up the server.
    2. Follow the Quickstart guide: Use the quickstart guide to perform an initial setup and verify the installation.
    3. Troubleshoot: If you encounter issues, consult the troubleshooting guide.

    Isso is a lightweight commenting server that supports anonymous comments, maintains identity, and is designed for easy integration into static websites using JavaScript and CORS.