madblog/config.example.yaml
Fabio Manganiello da76f84e68
feat(nav): Add new_tab option for nav_links
Render target="_blank" + rel="noopener" only when nav_link.new_tab is true
2026-03-23 23:20:18 +01:00

325 lines
13 KiB
YAML

# Example configuration file for Madblog
# All the fields can also be specified via environment variables (prefixed with
# MADBLOG_, all uppercase, and with underscores, e.g. MADBLOG_TITLE for the
# "title" field)
# The title of the blog (*strongly* recommended)
title: My Blog
# The description of the blog (recommended)
description: A blog about various topics.
# The base external link to the blog (*strongly* recommended, required for
# Webmentions)
link: https://myblog.example.com
# The home link that will be rendered in the header, if different from the main
# link (optional, but useful for blogs hosted on a different domain)
# home_link: https://myblog.example.com/home
# Rel="me" links for identity verification (optional)
# These will be rendered on each page as <link rel="me" href="..."> in the <head>
# but not displayed anywhere else. Useful for Mastodon profile verification.
# Can also be specified via the MADBLOG_REL_ME environment variable as a
# comma-separated list of URLs.
# rel_me:
# - https://mastodon.social/@myprofile
# - https://github.com/myprofile
# External links to show on the About page (optional)
# These can be simple URLs or objects with display_name (optional) and url fields.
# Links specified in ABOUT.md metadata take priority over these.
# Can also be specified via MADBLOG_EXTERNAL_LINKS environment variable as a
# comma-separated list of URLs.
# external_links:
# - https://github.com/myprofile
# - display_name: My Portfolio
# url: https://portfolio.example.com
# Navigation links to show in the main navigation panel (optional)
# These can be simple URLs or objects with url (required), display_name (optional),
# icon (optional) and new_tab (optional, default: false) fields. The icon can be
# an emoji/text or a URL (local path or absolute URL to an image). Set new_tab to
# true to open the link in a new browser tab/window.
# Can also be specified via MADBLOG_NAV_LINKS environment variable as a
# comma-separated list of URLs.
# nav_links:
# - https://example.com
# - display_name: GitHub
# icon: 🐙
# url: https://github.com/myprofile
# - display_name: Portfolio
# icon: /img/portfolio-icon.png
# url: https://portfolio.example.com
# new_tab: true
# Listening address for the built-in web server (optional, default: "0.0.0.0")
# host: 0.0.0.0
# Listening port for the built-in web server (optional, default: 8000)
# port: 8000
# Enable debug mode for more verbose logging (optional, default: false)
# debug: false
# The path to the directory that contains the blog posts (optional, default:
# ".", the current directory)
# content_dir: .
# A link to a logo image (optional)
# logo: https://myblog.example.com/logo.png
# Seconds to wait before re-processing content changes (optional, default: 10)
# This throttles file-watcher callbacks to avoid redundant work during bulk edits.
# throttle_seconds_on_update: 10
# The language of the blog (optional, default: "en-US")
# NOTE: The language can also be overridden on a per-article basis by
# specifying e.g. `[//]: # (language: en-US)` in the Markdown file
# language: en-US
# Default author name to be used when no author is specified (optional)
# author: Your Name
# Default author URL to be used when no author URL is specified (optional)
# mailto: links are also supported
# author_url: https://myblog.example.com
# Default author photo to be used when no author photo is specified (optional)
# author_photo: https://myblog.example.com/author.png
# View mode for the blog home page (optional, default: "cards")
# Supported values: "cards" (grid of article cards), "list" (compact title/date/description),
# "full" (scrollable WordPress-like view with full article content)
# view_mode: cards
# Whether to show the blog header in the generated pages (optional, default: true)
# header: true
# If set to true then the RSS/Atom feed will contain only short summaries
# of each post (optional, default: false)
# short_feed: false
# Max number of entries returned by the RSS/Atom feeds (optional, default: 10)
# max_entries_per_feed: 10
# Whether to enable Webmentions support (optional, default: true)
# enable_webmentions: true
# If set to true, then deleted Webmentions will be hard-deleted (their stored files
# will be removed) instead of being marked as deleted (optional, default: false)
# webmentions_hard_delete: false
# Whether to enable the guestbook page (optional, default: true)
# The guestbook aggregates homepage mentions from Webmentions and ActivityPub.
# enable_guestbook: true
# Default status for incoming Webmentions (if Webmentions are enabled) (optional,
# default: "confirmed"). If set to "pending" then the Webmention will be stored
# under the `mentions` directory as a Markdown file, with metadata header `status`
# set to "pending". If set to "confirmed" then the Webmention will be displayed
# on the site.
# webmentions_default_status: "confirmed"
# A list of categories for the blog (optional)
# categories:
# - Technology
# - Lifestyle
# - Travel
# - Food
#### (Optional) Rendering Features ####
# Whether to enable LaTeX rendering (optional, default: true)
# Set to false to disable LaTeX even if dependencies are available.
# Configurable via MADBLOG_ENABLE_LATEX environment variable.
# enable_latex: true
# Whether to enable Mermaid diagram rendering (optional, default: true)
# Set to false to disable Mermaid even if dependencies are available.
# Configurable via MADBLOG_ENABLE_MERMAID environment variable.
# enable_mermaid: true
#### (Optional) State Directory ####
# Directory where Madblog stores its state (ActivityPub keys, mentions, cache).
# If not set, defaults to <content_dir>/.madblog
# Configurable via MADBLOG_STATE_DIR environment variable.
# state_dir: /path/to/.madblog
#### (Optional) Feed aggregator mode ####
# A list of external RSS/Atom URLs that should also be rendered in the blog
# external_feeds:
# - https://example.com/atom.xml
# - https://example.com/rss.xml
#
# How often cached external feeds should be refreshed (in seconds).
# This prevents frequent requests to the external feed URLs.
# A value of zero disables the cache.
# feeds_cache_expiry_secs: 300
# If true, external feeds are rendered as separate folder sections on the home page
# (optional, default: false)
# external_feeds_as_folders: false
#### (Optional) Email Settings ####
# The email address of the author. Mention notifications will be delivered here
# author_email: 0q9aA@example.com
# If true, the author email will not be shown publicly on the About page or
# used as a fallback for article author URLs. The email can still be used for
# notifications. (optional, default: false)
# hide_email: false
# Outgoing mail server configuration (optional)
# smtp_server: smtp.example.com
# smtp_port: 587
# smtp_username: username
# smtp_password: password
# smtp_starttls: true
# smtp_enable_starttls_auto: true
# Override the sender address for outgoing emails (optional, defaults to author_email)
# smtp_sender: noreply@example.com
#### (Optional) ActivityPub Federation ####
# Requires: pip install 'madblog[activitypub]'
# Enable ActivityPub federation (optional, default: false)
# enable_activitypub: false
# The username for the ActivityPub actor (optional, default: "blog")
# The full handle will be @username@yourdomain.com
# activitypub_username: blog
# Override the base URL used for ActivityPub actor/object IDs (optional).
#
# By default, Madblog uses `link` as the ActivityPub base URL, so actor ID will
# be like: <link>/ap/actor.
#
# If you want your blog to be served at one hostname (e.g. https://blog.example.com)
# but you want ActivityPub actor IDs to live on another hostname (e.g. https://example.com)
# you can set this.
#
# Note: If you set this, you must ensure that the ActivityPub endpoints are
# reachable on that hostname (at least `/ap/*` and the `.well-known` endpoints).
# activitypub_link: https://example.com
# Override the domain used in WebFinger `acct:` identifiers (optional).
# This is useful if you serve the blog at one hostname (e.g.
# https://blog.example.com) but you want to advertise the fediverse handle as
# @username@example.com.
#
# Note: this only affects WebFinger `acct:` domain. It does NOT change where the
# actor and objects are hosted; those still use `link`.
# activitypub_domain: example.com
# Display name for the ActivityPub actor (optional, falls back to author or title)
# activitypub_name: My Blog
# Summary/bio for the ActivityPub actor (optional, falls back to description)
# activitypub_summary: A blog about various topics.
# Avatar URL for the ActivityPub actor (optional, falls back to author_photo)
# activitypub_icon_url: https://myblog.example.com/img/avatar.png
# Label used for the primary profile field that points to your blog URL.
# This will be advertised as a Mastodon-compatible "verified" profile field.
# (optional, default: "Blog")
# activitypub_profile_field_name: Blog
# Additional profile fields to advertise via ActivityPub.
# This is a mapping of field name -> field value.
# If the value is an http(s) URL, it will be rendered as a rel="me" link.
# (optional)
# activitypub_profile_fields:
# Git repository: https://git.example.com/myblog
# Donate: https://liberapay.com/myprofile
# About: A personal blog about technology
# Path to the RSA private key PEM file (optional).
# If not set, a keypair will be auto-generated on first start.
# The file must be readable only by the owner (chmod 600).
# activitypub_private_key_path: /path/to/private_key.pem
# Whether to require manual approval for new followers (optional, default: false)
# activitypub_manually_approves_followers: false
# Whether to send email notifications to the blog's author email when
# new ActivityPub activities occur, if ActivityPub is enabled, an email
# address is provided, and an SMTP server is configured (optional, default: true)
# activitypub_email_notifications: true
# ActivityPub object type: "Note" (default) renders content inline on
# Mastodon/Pleroma. "Article" only shows as a link preview card.
# activitypub_object_type: Note
# If true, only send the article description (not the full body) in
# ActivityPub posts (default: false).
# activitypub_description_only: false
# If true, the article title is sent as the ActivityPub "summary" field,
# which Mastodon/Pleroma render as a Content Warning / spoiler header
# that must be clicked to reveal the body. The description is kept as
# bold text at the top of the body. When false (default), title and
# description are both rendered inline in the post body with no CW.
# activitypub_posts_content_wrapped: false
# Quote policy for ActivityPub posts (optional, default: "public").
# Mastodon will refuse quote-boosts unless this is set to "public".
# activitypub_quote_control: public
# Automatically send a QuoteAuthorization when a remote actor quotes one
# of your posts. Without this, Mastodon keeps quotes in "pending" state.
# (optional, default: true)
# activitypub_auto_approve_quotes: true
#### (Optional) Moderation ####
# A list of blocked actors whose Webmentions and ActivityPub interactions
# will be silently rejected and not stored or rendered.
#
# Each entry can be one of:
# - A domain name: e.g. "spammer.example.com"
# Blocks all URLs/actors from that domain.
# - A full URL: e.g. "https://mastodon.social/users/spammer"
# Blocks that exact actor/source.
# - An ActivityPub FQN: e.g. "@spammer@mastodon.social" or "spammer@mastodon.social"
# Blocks that specific federated identity by matching domain + username.
# - A regular expression: delimited by "/", e.g. "/spammer\.example\..*/"
# Matched against the full source URL / actor ID.
#
# Can also be specified via the MADBLOG_BLOCKED_ACTORS environment variable
# as a comma- or space-separated list.
#
# blocked_actors:
# - spammer.example.com
# - "@troll@evil.social"
# - /spam-ring\.example\..*/
# An allowlist of actors whose Webmentions and ActivityPub interactions
# will be accepted. If set, only actors matching an entry in this list
# will be stored/rendered. Mutually exclusive with blocked_actors.
#
# Uses the same format as blocked_actors (domains, URLs, FQNs, or regexes).
# Can also be specified via the MADBLOG_ALLOWED_ACTORS environment variable.
#
# allowed_actors:
# - trusted.example.com
# - "@friend@mastodon.social"
#### (Optional) Post Visibility ####
# Default visibility for new posts (optional, default: "public")
# Supported values: "public", "unlisted", "followers", "private"
# This affects how posts are federated via ActivityPub.
# Can also be overridden per-article with `[//]: # (visibility: unlisted)`
# default_visibility: public
#### (Optional) Default Index Page ####
# The default page to show at the root URL "/" (optional, default: "blog")
# Supported values: "blog", "about", "tags", "guestbook"
# When set to something other than "blog", the root URL will redirect to
# that page. The blog index is always available at /blog regardless of this setting.
# default_index: blog