mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Formatting
This commit is contained in:
@@ -126,7 +126,7 @@ class BlogPlugin(BasePlugin[BlogConfig]):
|
|||||||
file.url = file.url.replace(path, root)
|
file.url = file.url.replace(path, root)
|
||||||
|
|
||||||
# Generate entrypoint, if it does not exist yet
|
# Generate entrypoint, if it does not exist yet
|
||||||
self._generate(files, config)
|
self._generate(config, files)
|
||||||
|
|
||||||
# Resolve and load posts and generate indexes (run later) - we resolve all
|
# Resolve and load posts and generate indexes (run later) - we resolve all
|
||||||
# posts after the navigation is constructed in order to allow other plugins
|
# posts after the navigation is constructed in order to allow other plugins
|
||||||
@@ -296,7 +296,7 @@ class BlogPlugin(BasePlugin[BlogConfig]):
|
|||||||
items = self._resolve_siblings(main, nav)
|
items = self._resolve_siblings(main, nav)
|
||||||
items[items.index(main)] = page
|
items[items.index(main)] = page
|
||||||
|
|
||||||
# Render excerpts and perpare pagination
|
# Render excerpts and prepare pagination
|
||||||
posts, pagination = self._render(page)
|
posts, pagination = self._render(page)
|
||||||
|
|
||||||
# Render pagination links
|
# Render pagination links
|
||||||
@@ -518,7 +518,7 @@ class BlogPlugin(BasePlugin[BlogConfig]):
|
|||||||
|
|
||||||
# Generate entrypoint - the entrypoint must always be present, and thus is
|
# Generate entrypoint - the entrypoint must always be present, and thus is
|
||||||
# created before the navigation is constructed if it does not exist yet
|
# created before the navigation is constructed if it does not exist yet
|
||||||
def _generate(self, files: Files, config: MkDocsConfig):
|
def _generate(self, config: MkDocsConfig, files: Files):
|
||||||
path = os.path.join(self.config.blog_dir, "index.md")
|
path = os.path.join(self.config.blog_dir, "index.md")
|
||||||
path = os.path.normpath(path)
|
path = os.path.normpath(path)
|
||||||
|
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class BlogPlugin(BasePlugin[BlogConfig]):
|
|||||||
file.url = file.url.replace(path, root)
|
file.url = file.url.replace(path, root)
|
||||||
|
|
||||||
# Generate entrypoint, if it does not exist yet
|
# Generate entrypoint, if it does not exist yet
|
||||||
self._generate(files, config)
|
self._generate(config, files)
|
||||||
|
|
||||||
# Resolve and load posts and generate indexes (run later) - we resolve all
|
# Resolve and load posts and generate indexes (run later) - we resolve all
|
||||||
# posts after the navigation is constructed in order to allow other plugins
|
# posts after the navigation is constructed in order to allow other plugins
|
||||||
@@ -296,7 +296,7 @@ class BlogPlugin(BasePlugin[BlogConfig]):
|
|||||||
items = self._resolve_siblings(main, nav)
|
items = self._resolve_siblings(main, nav)
|
||||||
items[items.index(main)] = page
|
items[items.index(main)] = page
|
||||||
|
|
||||||
# Render excerpts and perpare pagination
|
# Render excerpts and prepare pagination
|
||||||
posts, pagination = self._render(page)
|
posts, pagination = self._render(page)
|
||||||
|
|
||||||
# Render pagination links
|
# Render pagination links
|
||||||
@@ -518,7 +518,7 @@ class BlogPlugin(BasePlugin[BlogConfig]):
|
|||||||
|
|
||||||
# Generate entrypoint - the entrypoint must always be present, and thus is
|
# Generate entrypoint - the entrypoint must always be present, and thus is
|
||||||
# created before the navigation is constructed if it does not exist yet
|
# created before the navigation is constructed if it does not exist yet
|
||||||
def _generate(self, files: Files, config: MkDocsConfig):
|
def _generate(self, config: MkDocsConfig, files: Files):
|
||||||
path = os.path.join(self.config.blog_dir, "index.md")
|
path = os.path.join(self.config.blog_dir, "index.md")
|
||||||
path = os.path.normpath(path)
|
path = os.path.normpath(path)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user