{"id":27984,"library":"nikola","title":"Nikola","description":"A modular, fast, simple, static website and blog generator written in Python. Current version: 8.3.3 (requires Python >=3.8). It supports reStructuredText, Markdown, and other markup formats, with theming and plugin support. Release cadence is irregular, typically a few releases per year.","status":"active","version":"8.3.3","language":"python","source_language":"en","source_url":"https://github.com/getnikola/nikola","tags":["static site generator","blog","python","website","markdown","restructuredtext"],"install":[{"cmd":"pip install nikola","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Syntax highlighting for code blocks.","package":"Pygments","optional":true},{"reason":"Markdown input format support.","package":"markdown","optional":true},{"reason":"reStructuredText input format support.","package":"docutils","optional":true}],"imports":[{"note":"Nikola's CLI entry point is in __main__; importing from nikola.misc may fail.","wrong":"from nikola import main","symbol":"main","correct":"from nikola.__main__ import main"},{"note":"In older versions, the main class was in nikola.core, but since v8 it's directly in nikola.","wrong":"from nikola.core import Nikola","symbol":"Nikola","correct":"from nikola import Nikola"}],"quickstart":{"code":"import os\ntry:\n    from nikola import Nikola\n    from nikola.__main__ import main as nikola_main\n    # Example: create a new site (non-interactively)\n    # In practice, use: nikola init mysite\n    print('Nikola imported successfully')\nexcept ImportError as e:\n    print('Error importing Nikola:', e)","lang":"python","description":"Verify Nikola is installed and can be imported. Note that the CLI is the primary interface; programmatic usage is possible but not common."},"warnings":[{"fix":"Add 'TEMPLATE_ENGINE = \"mako\"' to your conf.py file or update your themes to Jinja2.","message":"In Nikola 8.x, the default template engine changed from Mako to Jinja2. Existing themes using Mako will fail unless you set TEMPLATE_ENGINE = 'mako' in conf.py.","severity":"breaking","affected_versions":">=8.0.0"},{"fix":"Use 'nikola new' instead of 'nikola new_post'.","message":"The 'nikola new_post' command has been deprecated in favor of 'nikola new'.","severity":"deprecated","affected_versions":">=8.2.0"},{"fix":"Use 'nikola init --demo mysite' to create a site with sample content.","message":"If you run 'nikola init' without the --demo option, it creates an empty site. Many users expect a sample blog and get confused.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure PATH is always a list, e.g., PATH = ['posts'].","message":"The 'PATH' configuration variable in conf.py is a list of strings, not a single string. Common mistake: setting PATH = '/path/to/something' instead of PATH = ['/path/to/something'].","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use 'from nikola import Nikola' or 'from nikola.__main__ import main' as appropriate.","cause":"Old code tries to import from 'nikola.core', which was restructured in v8.","error":"ModuleNotFoundError: No module named 'nikola.core'"},{"fix":"Run 'pip install nikola' and ensure the scripts directory is in your PATH (e.g., on Windows, use 'python -m nikola' instead).","cause":"Nikola is not installed or not in the PATH after installation.","error":"! [Errno 2] No such file or directory: 'nikola'"},{"fix":"Set 'TEMPLATE_ENGINE' in your conf.py file instead of passing it to the constructor.","cause":"In Nikola 8.x, the constructor signature changed. Passing template_engine directly is no longer supported.","error":"TypeError: __init__() got an unexpected keyword argument 'template_engine'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}