{"record":{"id":"d38461d92f50da46","repo":"squidfunk/mkdocs-material","slug":"couldn-t-find-separator-in-post-path-in","errorCode":null,"errorMessage":"Couldn't find '{separator}' in post '{path}' in '{docs}'","messagePattern":"Couldn't find '(.+?)' in post '(.+?)' in '(.+?)'","errorType":"exception","errorClass":"PluginError","httpStatus":null,"severity":"error","filePath":"src/plugins/blog/plugin.py","lineNumber":294,"sourceCode":"                    raise PluginError(f\"Couldn't find author '{id}'\")\n\n                # Append to list of authors\n                page.authors.append(self.authors[id])\n\n        # Extract settings for excerpts\n        separator      = self.config.post_excerpt_separator\n        max_authors    = self.config.post_excerpt_max_authors\n        max_categories = self.config.post_excerpt_max_categories\n\n        # Ensure presence of separator and throw, if its absent and required -\n        # we append the separator to the end of the contents of the post, if it\n        # is not already present, so we can remove footnotes or other content\n        # from the excerpt without affecting the content of the excerpt\n        if separator not in page.markdown:\n            if self.config.post_excerpt == \"required\":\n                docs = os.path.relpath(config.docs_dir)\n                path = os.path.relpath(page.file.abs_src_path, docs)\n                raise PluginError(\n                    f\"Couldn't find '{separator}' in post '{path}' in '{docs}'\"\n                )\n\n        # Create excerpt for post and inherit authors and categories - excerpts\n        # can contain a subset of the authors and categories of the post\n        page.excerpt            = Excerpt(page, config, files)\n        page.excerpt.authors    = page.authors[:max_authors]\n        page.excerpt.categories = page.categories[:max_categories]\n\n    # Process posts\n    def on_page_content(self, html, *, page, config, files):\n        if not self.config.enabled:\n            return\n\n        # Skip if page is not a post managed by this instance - this plugin has\n        # support for multiple instances, which is why this check is necessary\n        if page not in self.blog.posts:\n            return","sourceCodeStart":276,"sourceCodeEnd":312,"githubUrl":"https://github.com/squidfunk/mkdocs-material/blob/e2136532f40aed98af1f6497c0cc6a3cff9f759b/src/plugins/blog/plugin.py#L276-L312","documentation":"The blog plugin splits post excerpts at a configured separator (default <!-- more -->). When the separator is absent from a post's Markdown and post_excerpt is set to \"required\", on_page_markdown raises PluginError naming the separator, the post path, and the docs directory. It enforces that every post explicitly marks its excerpt boundary.","triggerScenarios":"Configuring post_excerpt: required while a post lacks the <!-- more --> (or custom) separator; writing the separator with wrong casing/spacing; deleting the separator during edits.","commonSituations":"Customizing post_excerpt_separator in mkdocs.yml but not updating existing posts; authors forgetting to insert <!-- more -->; separators inside code blocks being stripped or altered by other extensions.","solutions":["Add the separator (default <!-- more -->) into the post where the excerpt should end.","Or relax the config: set post_excerpt: optional (or default) in the blog plugin settings.","If you use a custom separator, ensure posts use exactly that string, including spacing."],"exampleFix":"# before (mkdocs.yml)\nplugins:\n  - blog:\n      post_excerpt: required\n# post.md missing separator -> add:\nIntro text here...\n<!-- more -->\n\nRest of the post.","handlingStrategy":"validation","validationCode":"# CI check: every post contains the excerpt separator\nimport pathlib\nSEP = \"<!-- more -->\"\nfor post in pathlib.Path(\"docs/blog/posts\").rglob(\"*.md\"):\n    assert SEP in post.read_text(), f\"{post} missing '{SEP}'\"","typeGuard":"null","tryCatchPattern":"try:\n    mkdocs.commands.build.build(config)\nexcept PluginError as e:\n    if str(e).startswith(\"Couldn't find '\"):\n        print(\"Insert the excerpt separator in the named post:\", e)\n    else:\n        raise","preventionTips":["Add the <!-- more --> separator in post templates/scaffolding.","If changing post_excerpt_separator, update all posts in the same change.","Only set post_excerpt: required when all existing posts comply.","Insert the separator in body text, never inside code fences."],"tags":["python","mkdocs","blog-plugin","configuration"],"backgroundTag":"missing-required-marker","analyzedSha":"e2136532f40aed98af1f6497c0cc6a3cff9f759b","analyzedAt":"2026-08-29T11:20:04.299Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}