graph LR
Pelican_Plugin_Core_PPC_["Pelican Plugin Core (PPC)"]
Content_Input_Parsing_CIP_["Content Input & Parsing (CIP)"]
Content_Processing_Enrichment_CPE_["Content Processing & Enrichment (CPE)"]
Internationalization_Subsite_Management_ISM_["Internationalization & Subsite Management (ISM)"]
Site_Output_Generation_SOG_["Site Output Generation (SOG)"]
Site_Optimization_Validation_SOV_["Site Optimization & Validation (SOV)"]
External_Publishing_Distribution_EPD_["External Publishing & Distribution (EPD)"]
Pelican_Plugin_Core_PPC_ -- "Initializes & Registers Readers" --> Content_Input_Parsing_CIP_
Pelican_Plugin_Core_PPC_ -- "Registers & Invokes Processors" --> Content_Processing_Enrichment_CPE_
Pelican_Plugin_Core_PPC_ -- "Initializes & Configures i18n" --> Internationalization_Subsite_Management_ISM_
Pelican_Plugin_Core_PPC_ -- "Registers & Invokes Generators" --> Site_Output_Generation_SOG_
Pelican_Plugin_Core_PPC_ -- "Registers & Invokes Optimizers/Validators" --> Site_Optimization_Validation_SOV_
Pelican_Plugin_Core_PPC_ -- "Registers & Invokes Publishers" --> External_Publishing_Distribution_EPD_
Content_Input_Parsing_CIP_ -- "Provides Parsed Content" --> Content_Processing_Enrichment_CPE_
Content_Processing_Enrichment_CPE_ -- "Provides Processed Content" --> Site_Output_Generation_SOG_
Content_Processing_Enrichment_CPE_ -- "Provides Content for Publishing" --> External_Publishing_Distribution_EPD_
Internationalization_Subsite_Management_ISM_ -- "Filters/Modifies Content for Locales" --> Content_Processing_Enrichment_CPE_
Internationalization_Subsite_Management_ISM_ -- "Directs Output Generation per Subsite" --> Site_Output_Generation_SOG_
Site_Output_Generation_SOG_ -- "Provides Generated Files" --> Site_Optimization_Validation_SOV_
click Pelican_Plugin_Core_PPC_ href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/pelican-plugins/Pelican_Plugin_Core_PPC_.md" "Details"
click Content_Input_Parsing_CIP_ href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/pelican-plugins/Content_Input_Parsing_CIP_.md" "Details"
click Content_Processing_Enrichment_CPE_ href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/pelican-plugins/Content_Processing_Enrichment_CPE_.md" "Details"
The Pelican plugin ecosystem operates as a modular, event-driven architecture centered around the Pelican Plugin Core (PPC). This core component acts as the central orchestrator, responsible for initializing, registering, and managing the lifecycle of all plugins. It establishes the primary integration points by hooking into Pelican's build process events, allowing other components to extend and modify the static site generation workflow.
The data flow begins with the Content Input & Parsing (CIP) component, which handles the initial ingestion and parsing of raw content files (e.g., Markdown, reStructuredText). Once content is parsed, it is passed to the Content Processing & Enrichment (CPE) component. This component is a hub for various transformations, enriching the content with dynamic data, processing embedded media, and integrating external feeds.
For multi-language sites, the Internationalization & Subsite Management (ISM) component plays a crucial role, filtering and modifying content for specific locales and directing the output generation for localized subsites. After content is fully processed and enriched, the Site Output Generation (SOG) component takes over, producing the final static site files, including HTML pages, RSS/Atom feeds, and sitemaps.
Finally, the generated output is handed off to the Site Optimization & Validation (SOV) component for performance enhancements like Gzip caching and image optimization, as well as integrity checks such as W3C validation. Concurrently, the External Publishing & Distribution (EPD) component handles the automated dissemination of content to external platforms and social media, completing the content lifecycle. This structured flow ensures a robust and extensible static site generation process.
Pelican Plugin Core (PPC) [Expand]
The central orchestrator responsible for initializing, registering, and managing the lifecycle of all plugins within the Pelican framework. It handles global settings and hooks into Pelican's build process events, acting as the primary integration point for extensions.
Related Classes/Methods:
md_inline_extension.inline:pelican_init:1-100render_math.math:pelican_init:1-100plantuml.plantuml_rst:pelican_init:1-100pelican_comment_system.pelican_comment_system:pelican_initialized:1-100tag_cloud.tag_cloud:init_default_config:1-100
Content Input & Parsing (CIP) [Expand]
Handles the initial phase of content processing, including reading raw source files (e.g., Markdown, reStructuredText, AsciiDoc) and parsing them into Pelican's internal content objects. This component also incorporates extensions that enhance the parsing capabilities, such as custom directives or inline markdown extensions.
Related Classes/Methods:
asciidoc_reader.asciidoc_reader:read:1-100creole_reader.creole_reader:read:1-100org_python_reader.org_python_reader:read:1-100jpeg_reader.jpeg_reader:1-100textile_reader.textile_reader:1-100rmd_reader.rmd_reader:1-100bootstrap-rst.bootstrap-rst:1-100gist_directive.gist_directive:1-100liquid_tags.mdx_liquid_tags:1-100md_inline_extension.pelican_inline_markdown_extension:extendMarkdown:1-100plantuml.plantuml_md:1-100render_math.pelican_mathjax_markdown_extension:1-100twitter_bootstrap_rst_directives.twitter_bootstrap_rst_directives:1-100
Content Processing & Enrichment (CPE) [Expand]
Applies a wide range of modifications, enhancements, and data injections to content objects after initial parsing. This includes adding dynamic data (e.g., author images, read times, VCS metadata), processing embedded media (images, audio, video), integrating external content feeds (e.g., GitHub activity, Goodreads), and managing static comments.
Related Classes/Methods:
author_images.author_images:add_author_images:1-100clean_summary.clean_summary:22-35collate_content.collate_content:1-100glossary.glossary:1-100linker.linker:1-100more_categories.more_categories:1-100neighbors.neighbors:45-59post_stats.post_stats:1-100readtime.readtime:calculate_readtime:1-100read_more_link.read_more_linkrepresentative_image.representative_image:1-100section_number.section_number:1-100shortcodes.shortcodessummary.summarysubcategory.subcategoryfiletime_from_git.content_adapter:get_oldest_commit_date:1-100filetime_from_hg.filetime_from_hg:29-77photos.photos:detect_images_and_galleries:1-100thumbnailer.thumbnailer:1-100liquid_tags.liquid_tagsvideo_privacy_enhancer.video_privacy_enhancer:1-100disqus_static.disqus_static:disqus_static:1-100github_activity.github_activity:1-100goodreads_activity.goodreads_activitywebring.webring:1-100pelican_comment_system.comments
Dedicated to managing multi-language content and generating localized subsites. This component ensures proper content filtering, translation handling, and interlinking across different language versions of the site.
Related Classes/Methods:
i18n_subsites.i18n_subsites:filter_contents_translations:1-100i18n_subsites.i18n_subsites:interlink_translated_content:1-100i18n_subsites.i18n_subsites:update_generators:1-100
Responsible for taking the fully processed content and generating the final static site files in various formats. This includes HTML pages, RSS/Atom feeds, sitemaps, PDFs, and RDF metadata, preparing them for deployment.
Related Classes/Methods:
feed_summary.feed_summary:1-100pdf.pdf:generate_output:1-100permalinks.permalinks:1-100sitemap.sitemap:generate_output:1-100tipue_search.pelican.plugins.tipue_search.tipue_search:1-100pelican-rdf.pelican_rdf:generate_context:1-100
Focuses on enhancing the performance and validating the integrity of the generated static site files. This includes tasks like Gzip caching, image optimization, and W3C validation to ensure the site is efficient and standards-compliant.
Related Classes/Methods:
Manages automated publishing of generated content to external platforms and social media services. This component facilitates seamless content distribution beyond the static site itself.
Related Classes/Methods: