1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-12 01:50:52 +01:00

Formatting

This commit is contained in:
squidfunk 2023-08-23 15:39:49 +02:00
parent 92fc7f651f
commit 1b2ba4bcef
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
10 changed files with 28 additions and 28 deletions

View File

@ -31,11 +31,11 @@ from mkdocs.config.base import Config
class BlogConfig(Config):
enabled = Type(bool, default = True)
# Options for blog
# Settings for blog
blog_dir = Type(str, default = "blog")
blog_toc = Type(bool, default = False)
# Options for posts
# Settings for posts
post_dir = Type(str, default = "{blog}/posts")
post_date_format = Type(str, default = "long")
post_url_date_format = Type(str, default = "yyyy/MM/dd")
@ -50,7 +50,7 @@ class BlogConfig(Config):
post_readtime = Type(bool, default = True)
post_readtime_words_per_minute = Type(int, default = 265)
# Options for archive
# Settings for archive
archive = Type(bool, default = True)
archive_name = Type(str, default = "blog.archive")
archive_date_format = Type(str, default = "yyyy")
@ -58,7 +58,7 @@ class BlogConfig(Config):
archive_url_format = Type(str, default = "archive/{date}")
archive_toc = Optional(Type(bool))
# Options for categories
# Settings for categories
categories = Type(bool, default = True)
categories_name = Type(str, default = "blog.categories")
categories_url_format = Type(str, default = "category/{slug}")
@ -67,7 +67,7 @@ class BlogConfig(Config):
categories_allowed = Type(list, default = [])
categories_toc = Optional(Type(bool))
# Options for pagination
# Settings for pagination
pagination = Type(bool, default = True)
pagination_per_page = Type(int, default = 10)
pagination_url_format = Type(str, default = "page/{page}")
@ -75,14 +75,14 @@ class BlogConfig(Config):
pagination_if_single_page = Type(bool, default = False)
pagination_keep_content = Type(bool, default = False)
# Options for authors
# Settings for authors
authors = Type(bool, default = True)
authors_file = Type(str, default = "{blog}/.authors.yml")
# Options for drafts
# Settings for drafts
draft = Type(bool, default = False)
draft_on_serve = Type(bool, default = True)
draft_if_future_date = Type(bool, default = False)
# Deprecated options
# Deprecated settings
pagination_template = Deprecated(moved_to = "pagination_format")

View File

@ -30,6 +30,6 @@ class InfoConfig(Config):
enabled = Type(bool, default = True)
enabled_on_serve = Type(bool, default = False)
# Options for archive
# Settings for archive
archive = Type(bool, default = True)
archive_stop_on_violation = Type(bool, default = True)

View File

@ -45,11 +45,11 @@ class SearchConfig(Config):
separator = Optional(Type(str))
pipeline = ListOfItems(Choice(pipeline), default = [])
# Options for text segmentation (Chinese)
# Settings for text segmentation (Chinese)
jieba_dict = Optional(Type(str))
jieba_dict_user = Optional(Type(str))
# Unsupported options, originally implemented in MkDocs
# Unsupported settings, originally implemented in MkDocs
indexing = Deprecated(message = "Unsupported option")
prebuild_index = Deprecated(message = "Unsupported option")
min_search_length = Deprecated(message = "Unsupported option")

View File

@ -30,12 +30,12 @@ class SocialConfig(Config):
enabled = Type(bool, default = True)
cache_dir = Type(str, default = ".cache/plugin/social")
# Options for social cards
# Settings for social cards
cards = Type(bool, default = True)
cards_dir = Type(str, default = "assets/images/social")
cards_layout_options = Type(dict, default = {})
# Deprecated options
# Deprecated settings
cards_color = Deprecated(
option_type = Type(dict, default = {}),
message =

View File

@ -33,7 +33,7 @@ from . import casefold
class TagsConfig(Config):
enabled = Type(bool, default = True)
# Options for tags
# Settings for tags
tags_file = Optional(Type(str))
tags_extra_files = Type(dict, default = {})
tags_slugify = Type((type(slugify), partial), default = slugify)

View File

@ -31,11 +31,11 @@ from mkdocs.config.base import Config
class BlogConfig(Config):
enabled = Type(bool, default = True)
# Options for blog
# Settings for blog
blog_dir = Type(str, default = "blog")
blog_toc = Type(bool, default = False)
# Options for posts
# Settings for posts
post_dir = Type(str, default = "{blog}/posts")
post_date_format = Type(str, default = "long")
post_url_date_format = Type(str, default = "yyyy/MM/dd")
@ -50,7 +50,7 @@ class BlogConfig(Config):
post_readtime = Type(bool, default = True)
post_readtime_words_per_minute = Type(int, default = 265)
# Options for archive
# Settings for archive
archive = Type(bool, default = True)
archive_name = Type(str, default = "blog.archive")
archive_date_format = Type(str, default = "yyyy")
@ -58,7 +58,7 @@ class BlogConfig(Config):
archive_url_format = Type(str, default = "archive/{date}")
archive_toc = Optional(Type(bool))
# Options for categories
# Settings for categories
categories = Type(bool, default = True)
categories_name = Type(str, default = "blog.categories")
categories_url_format = Type(str, default = "category/{slug}")
@ -67,7 +67,7 @@ class BlogConfig(Config):
categories_allowed = Type(list, default = [])
categories_toc = Optional(Type(bool))
# Options for pagination
# Settings for pagination
pagination = Type(bool, default = True)
pagination_per_page = Type(int, default = 10)
pagination_url_format = Type(str, default = "page/{page}")
@ -75,14 +75,14 @@ class BlogConfig(Config):
pagination_if_single_page = Type(bool, default = False)
pagination_keep_content = Type(bool, default = False)
# Options for authors
# Settings for authors
authors = Type(bool, default = True)
authors_file = Type(str, default = "{blog}/.authors.yml")
# Options for drafts
# Settings for drafts
draft = Type(bool, default = False)
draft_on_serve = Type(bool, default = True)
draft_if_future_date = Type(bool, default = False)
# Deprecated options
# Deprecated settings
pagination_template = Deprecated(moved_to = "pagination_format")

View File

@ -30,6 +30,6 @@ class InfoConfig(Config):
enabled = Type(bool, default = True)
enabled_on_serve = Type(bool, default = False)
# Options for archive
# Settings for archive
archive = Type(bool, default = True)
archive_stop_on_violation = Type(bool, default = True)

View File

@ -45,11 +45,11 @@ class SearchConfig(Config):
separator = Optional(Type(str))
pipeline = ListOfItems(Choice(pipeline), default = [])
# Options for text segmentation (Chinese)
# Settings for text segmentation (Chinese)
jieba_dict = Optional(Type(str))
jieba_dict_user = Optional(Type(str))
# Unsupported options, originally implemented in MkDocs
# Unsupported settings, originally implemented in MkDocs
indexing = Deprecated(message = "Unsupported option")
prebuild_index = Deprecated(message = "Unsupported option")
min_search_length = Deprecated(message = "Unsupported option")

View File

@ -30,12 +30,12 @@ class SocialConfig(Config):
enabled = Type(bool, default = True)
cache_dir = Type(str, default = ".cache/plugin/social")
# Options for social cards
# Settings for social cards
cards = Type(bool, default = True)
cards_dir = Type(str, default = "assets/images/social")
cards_layout_options = Type(dict, default = {})
# Deprecated options
# Deprecated settings
cards_color = Deprecated(
option_type = Type(dict, default = {}),
message =

View File

@ -33,7 +33,7 @@ from . import casefold
class TagsConfig(Config):
enabled = Type(bool, default = True)
# Options for tags
# Settings for tags
tags_file = Optional(Type(str))
tags_extra_files = Type(dict, default = {})
tags_slugify = Type((type(slugify), partial), default = slugify)