Skip to content

Commit

Permalink
Merge branch 'master' into zh_CN
Browse files Browse the repository at this point in the history
  • Loading branch information
dpy013 committed Jul 13, 2021
2 parents 0a7e707 + b12804d commit b4a471b
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 41 deletions.
30 changes: 15 additions & 15 deletions docs/about/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ configuration documentation for details.

The [use_directory_urls](../user-guide/configuration.md#use_directory_urls)
configuration option will be forced to `false` if
[site_url](../user-guide/configuration.md#site_url) is set to an emtpy
[site_url](../user-guide/configuration.md#site_url) is set to an empty
string. In that case, if `use_directory_urls` is not explicitly set to
`false`, a warning will be issued (#2189).

Expand Down Expand Up @@ -201,7 +201,7 @@ configuration documentation for details.

* The `mkdocs.utils.warning_filter` is deprecated and now does nothing. Plugins
should remove any reference to is as it may be deleted in a future release.
To ensure any warnings get counted, simply log them to the `mkdocs` log (i.e:
To ensure any warnings get counted, simply log them to the `mkdocs` log (i.e.:
`mkdocs.plugins.pluginname`).

* The `on_serve` event (which receives the `server` object and the `builder`
Expand All @@ -221,7 +221,7 @@ configuration documentation for details.
prebuilt index for search.

* The `lunr` and `lunr[languages]` dependencies are no longer installed by
default. The dependencies are only needed for the rare user who prebuilds the
default. The dependencies are only needed for the rare user who pre-builds the
search index and uses the `python` option, which is now pending deprecation.
If you use this feature, then you will need to manually install `lunr` and
`lunr[languages]`. A warning is issued if the dependencies are needed but not
Expand All @@ -241,7 +241,7 @@ configuration documentation for details.
item in the ReadTheDocs theme (#2297).
* Structure Files object now has a `remove` method to help plugin developers
manipulate the Files tree. The corresponding `src_paths` has become a
property to accomodate this possible dynamic behavior. See #2305.
property to accommodate this possible dynamic behavior. See #2305.
* Updated highlight.js to 10.5.0. See #2313.
* Bugfix: Search plugin now works with Japanese language. See #2178.
* Documentation has been refactored (#1629).
Expand Down Expand Up @@ -280,7 +280,7 @@ configuration documentation for details.

#### Support for Lunr.py as `prebuild_index` engine

Mkdocs now supports prebuilding indices using [Lunr.py][lunrpy-docs], a pure
Mkdocs now supports pre-building indices using [Lunr.py][lunrpy-docs], a pure
Python implementation of Lunr.js, allowing the user to avoid installing a
NodeJS environment if so desired. For more information please read the
[`prebuild_index` documentation][prebuildindex-docs].
Expand All @@ -301,7 +301,7 @@ documentation][rtd-docs] for details.
#### Update `mkdocs` theme to Bootswatch 4.1.3 (#1563)

The `mkdocs` theme now supports all the features of [Bootswatch 4.1].
Additionaly, 2 filenames were changed in this update. If you are using a theme
Additionally, 2 filenames were changed in this update. If you are using a theme
which inherits from the `mkdocs` theme, the theme developer may need to update
these filenames as follows.

Expand Down Expand Up @@ -333,8 +333,8 @@ may be removed in a future version of MkDocs.
### Other Changes and Additions to Version 1.1

* Bugfix: Ensure nested dot files in themes are ignored and document behavior (#1981).
* Update minimum dependancy to Markdown 3.2.1.
* Updated minimum dependancy to Jinja 2.10.1 to address security
* Update minimum dependency to Markdown 3.2.1.
* Updated minimum dependency to Jinja 2.10.1 to address security
concerns (#1780).
* Update to lunr.js 2.3.8 (#1989).
* Add support for Python 3.8.
Expand Down Expand Up @@ -419,12 +419,12 @@ The changes included in the refactor are summarized below.
As part of the internal refactor, a number of backward incompatible changes have
been introduced, which are summarized below.

###### URLS have changed when `use_directory_urls` is `False`
###### URLs have changed when `use_directory_urls` is `False`

Previously, all Markdown pages would be have their filenames altered to be index
pages regardless of how the [use_directory_urls] setting was configured.
However, the path munging is only needed when `use_directory_urls` is set to
`True` (the default). The path mungling no longer happens when
`True` (the default). The path mangling no longer happens when
`use_directory_urls` is set to `False`, which will result in different URLs for
all pages that were not already index files. As this behavior only effects a
non-default configuration, and the most common user-case for setting the option
Expand Down Expand Up @@ -551,7 +551,7 @@ meta-data or MultiMarkdown style meta-data is being used.
Previously MkDocs would recognize MultiMarkdown style meta-data between the
deliminators. Now, if the deliminators are detected, but the content between the
deliminators is not valid YAML meta-data, MkDocs does not attempt to parse the
content as MultiMarkdown style meta-data. Therefore, MultiMarkdowns style
content as MultiMarkdown style meta-data. Therefore, MultiMarkdown's style
meta-data must not include the deliminators. See the [MultiMarkdown style
meta-data documentation] for details.

Expand Down Expand Up @@ -623,7 +623,7 @@ value to the `theme.custom_dir` option and a warning was issued. As of version
* Refactor `writing-your-docs.md` (#1392).
* Workaround Safari bug when zooming to < 100% (#1389).
* Remove addition of `clicky` class to body and animations. (#1387).
* Prevent search plugin from reinjecting `extra_javascript` files (#1388).
* Prevent search plugin from re-injecting `extra_javascript` files (#1388).
* Refactor `copy_media_files` util function for more flexibility (#1370).
* Remove PyPI Deployment Docs (#1360).
* Update links to Python-Markdown library (#1360).
Expand Down Expand Up @@ -782,7 +782,7 @@ JavaScript files will not be included in the HTML templates, however, a warning
will be issued. In other words, they will still be copied to the `site-dir`, but
they will not have any effect on the theme if they are not explicitly listed.

All CSS and javaScript files in the `docs_dir` should be explicitly listed in
All CSS and JavaScript files in the `docs_dir` should be explicitly listed in
the `extra_css` or `extra_javascript` config settings going forward.

### Other Changes and Additions to Version 0.17.0
Expand Down Expand Up @@ -958,7 +958,7 @@ included in the HTML templates. In other words, they will still be copied to the
`site-dir`, but they will not have any effect on the theme if they are not
explicitly listed.

All CSS and javaScript files in the `docs_dir` should be explicitly listed in
All CSS and JavaScript files in the `docs_dir` should be explicitly listed in
the `extra_css` or `extra_javascript` config settings going forward.

#### Support for dirty builds. (#990)
Expand Down Expand Up @@ -1254,7 +1254,7 @@ documentation.
* Add favicon support to the ReadTheDocs theme HTML. (#422)
* Automatically refresh the browser when files are edited. (#163)
* Bugfix: Never re-write URLs in code blocks. (#240)
* Bugfix: Don't copy ditfiles when copying media from the `docs_dir`. (#254)
* Bugfix: Don't copy dotfiles when copying media from the `docs_dir`. (#254)
* Bugfix: Fix the rendering of tables in the ReadTheDocs theme. (#106)
* Bugfix: Add padding to the bottom of all bootstrap themes. (#255)
* Bugfix: Fix issues with nested Markdown pages and the automatic pages
Expand Down
2 changes: 1 addition & 1 deletion docs/dev-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The MkDocs Developer Guide provides documentation for developers of third
party themes and plugins. Please see the [Contributing Guide] for information
on contributing to MkDocs itself. You can jump directly to a page listed
below, or use the *next* and *previous* buttons in the navigation bar at the
top of the page to move through the documention in order.
top of the page to move through the documentation in order.

- [Themes](themes.md)
- [Plugins](plugins.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/dev-guide/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ MkDocs defines four error types:
#### `mkdocs.exceptions.MkDocsException`

: The base class which all MkDocs exceptions inherit from. This should
not be raised directly. One of the sublcasses should be raised instead.
not be raised directly. One of the subclasses should be raised instead.

#### `mkdocs.exceptions.ConfigurationError`

Expand Down
4 changes: 2 additions & 2 deletions docs/dev-guide/themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ A `section` navigation object defines a named section in the navigation and
contains a list of child navigation objects. Note that sections do not contain
URLs and are not links of any kind. However, by default, MkDocs sorts index
pages to the top and the first child might be used as the URL for a section if a
theme choses to do so.
theme chooses to do so.

The following attributes are available on `section` objects:

Expand Down Expand Up @@ -498,7 +498,7 @@ The title of the link. This would generally be used as the label of the link.
##### link.url

The URL that the link points to. The URL should always be an absolute URLs and
should not need to have `base_url` prepened.
should not need to have `base_url` prepended.

##### link.parent

Expand Down
2 changes: 1 addition & 1 deletion docs/dev-guide/translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ guidance on modifying the existing themes, see the [Contributing Guide][update
themes]. To enable a specific translation see the documentation about the
specific theme you are using in the [User Guide][built-in themes]. For
translations of third-party themes, please see the documentation for those
themes. For a third-party theme to make use of MkDoc's translation tools and
themes. For a third-party theme to make use of MkDocs' translation tools and
methods, that theme must be properly [configured] to make use of those tools.

!!! note
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/choosing-your-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ supports the following options:
name: mkdocs
nav_style: dark

* __`locale`__{ #mkdocs-locale }: The locale (languange/location) used to
* __`locale`__{ #mkdocs-locale }: The locale (language/location) used to
build the theme. If your locale is not yet supported, it will fallback
to the default.

Expand Down Expand Up @@ -166,7 +166,7 @@ theme supports the following options:
* __`sticky_navigation`__: If True, causes the sidebar to scroll with the main
page content as you scroll the page. Default: `True`.

* __`locale`__{ #readthedocs-locale }: The locale (languange/location) used to
* __`locale`__{ #readthedocs-locale }: The locale (language/location) used to
build the theme. If your locale is not yet supported, it will fallback
to the default.

Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@ Set the copyright information to be included in the documentation by the theme.

### remote_branch

Set the remote branch to commit to when using `gh-deploy` to deploy to Github
Set the remote branch to commit to when using `gh-deploy` to deploy to GitHub
Pages. This option can be overridden by a command line option in `gh-deploy`.

**default**: `gh-pages`

### remote_name

Set the remote name to push to when using `gh-deploy` to deploy to Github Pages.
Set the remote name to push to when using `gh-deploy` to deploy to GitHub Pages.
This option can be overridden by a command line option in `gh-deploy`.

**default**: `origin`
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/customizing-your-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ make tweaks and customizations to existing themes. To use these, you simply
need to include either CSS or JavaScript files within your [documentation
directory].

For example, to change the colour of the headers in your documentation, create
For example, to change the color of the headers in your documentation, create
a file called `extra.css` and place it next to the documentation Markdown. In
that file add the following CSS.

Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Building Documentation with MkDocs
---

The MkDocs Developer Guide provides documentation for users of MkDocs. See
[Getting Started] for an intorductory totorial. You can jump directly to a
[Getting Started] for an introductory tutorial. You can jump directly to a
page listed below, or use the *next* and *previous* buttons in the navigation
bar at the top of the page to move through the documention in order.
bar at the top of the page to move through the documentation in order.

- [Installation](installation.md)
- [Writing Your Docs](writing-your-docs.md)
Expand Down
2 changes: 1 addition & 1 deletion mkdocs/commands/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def _build_template(name, template, files, config, nav):

if utils.is_error_template(name):
# Force absolute URLs in the nav of error pages and account for the
# possability that the docs root might be different than the server root.
# possibility that the docs root might be different than the server root.
# See https://github.com/mkdocs/mkdocs/issues/77.
# However, if site_url is not set, assume the docs root and server root
# are the same. See https://github.com/mkdocs/mkdocs/issues/1598.
Expand Down
6 changes: 3 additions & 3 deletions mkdocs/config/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def _open_config_file(config_file):
When None, it defaults to `mkdocs.yml` in the CWD. If a closed file descriptor
is received, a new file descriptor is opened for the same file.
The file descriptor is automaticaly closed when the context manager block is existed.
The file descriptor is automatically closed when the context manager block is existed.
"""

# Default to the standard config filename.
Expand Down Expand Up @@ -181,7 +181,7 @@ def _open_config_file(config_file):
f"Config file '{paths_to_try[0]}' does not exist.")
else:
log.debug(f"Loading configuration file: {config_file}")
# Ensure file descriptor is at begining
# Ensure file descriptor is at beginning
config_file.seek(0)

try:
Expand Down Expand Up @@ -212,7 +212,7 @@ def load_config(config_file=None, **kwargs):
with _open_config_file(config_file) as fd:
options['config_file_path'] = getattr(fd, 'name', '')

# Initialise the config with the default schema.
# Initialize the config with the default schema.
from mkdocs.config.defaults import get_schema
cfg = Config(schema=get_schema(), config_file_path=options['config_file_path'])
# load the config file
Expand Down
4 changes: 2 additions & 2 deletions mkdocs/config/config_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def run_validation(self, value):
def post_validation(self, config, key_name):
"""
After all options have passed validation, perform a post-validation
process to do any additional changes dependant on other config values.
process to do any additional changes dependent on other config values.
The post-validation process method should be implemented by subclasses.
"""
Expand Down Expand Up @@ -243,7 +243,7 @@ class IpAddress(OptionallyRequired):
"""
IpAddress Config Option
Validate that an IP address is in an apprioriate format
Validate that an IP address is in an appropriate format
"""

def run_validation(self, value):
Expand Down
2 changes: 1 addition & 1 deletion mkdocs/config/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Once we drop Python 2.6 support, this could be an OrderedDict, however, it
# isn't really needed either as we always sequentially process the schema other
# than at initialisation when we grab the full set of keys for convenience.
# than at initialization when we grab the full set of keys for convenience.


def get_schema():
Expand Down
2 changes: 1 addition & 1 deletion mkdocs/structure/nav.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def get_navigation(files, config):
)
# Any documentation files not found in the nav should still have an associated page, so we
# create them here. The Page object will automatically be assigned to `file.page` during
# its creation (and this is the only way in which these page objects are accessable).
# its creation (and this is the only way in which these page objects are accessible).
for file in missing_from_config:
Page(None, file, config)

Expand Down
2 changes: 1 addition & 1 deletion mkdocs/tests/build_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def test_copying_media(self, site_dir, docs_dir):
cfg = load_config(docs_dir=docs_dir, site_dir=site_dir)
build.build(cfg)

# Verify that only non-empty md file (coverted to html), static HTML file and image are copied.
# Verify that only non-empty md file (converted to html), static HTML file and image are copied.
self.assertPathIsFile(site_dir, 'index.html')
self.assertPathIsFile(site_dir, 'img.jpg')
self.assertPathIsFile(site_dir, 'static.html')
Expand Down
2 changes: 1 addition & 1 deletion mkdocs/tests/structure/page_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def test_BOM(self):
cfg = load_config(docs_dir=docs_dir)
fl = File('index.md', cfg['docs_dir'], cfg['site_dir'], cfg['use_directory_urls'])
pg = Page(None, fl, cfg)
# Create an UTF-8 Encoded file with BOM (as Micorsoft editors do). See #1186
# Create an UTF-8 Encoded file with BOM (as Microsoft editors do). See #1186
with open(fl.abs_src_path, 'w', encoding='utf-8-sig') as f:
f.write(md_src)
# Now read the file.
Expand Down
8 changes: 4 additions & 4 deletions mkdocs/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def normalize_url(path, page=None, base=''):
@functools.lru_cache(maxsize=None)
def _get_norm_url(path):
path = path_to_url(path or '.')
# Allow links to be fully qualified URL's
# Allow links to be fully qualified URLs
parsed = urlparse(path)
if parsed.scheme or parsed.netloc or path.startswith(('/', '#')):
return path, True
Expand Down Expand Up @@ -445,7 +445,7 @@ def get_counts(self):
# A global instance to use throughout package
log_counter = CountHandler()

# For backward compatability as some plugins import it.
# It is no longer nessecary as all messages on the
# `mkdocs` logger get counted automaticaly.
# For backward compatibility as some plugins import it.
# It is no longer necessary as all messages on the
# `mkdocs` logger get counted automatically.
warning_filter = logging.Filter()

0 comments on commit b4a471b

Please sign in to comment.