diff --git a/docs/user-guide/configuration.md b/docs/user-guide/configuration.md
index fbd5a287..bb0ba228 100644
--- a/docs/user-guide/configuration.md
+++ b/docs/user-guide/configuration.md
@@ -200,6 +200,22 @@ For example, to enable the [SmartyPants typography extension][smarty], use:
 
     markdown_extensions: [smartypants]
 
+Some extensions provide configuration options of their own. If you would like to set any configuration options, then you can define `markdown_extensions` as a key/value mapping rather than a list. The key must be the name of the extension and the value must be a key/value pair (option name/option value) for the configuration option.
+
+For example, to enable permalinks in the (included) `toc` extension, use:
+
+    markdown_extensions:
+        toc:
+            permalink: True
+
+Add additonal items for each extension. If you have no configuration options to set for a specific extension, then you may leave that extensions options blank:
+
+    markdown_extensions:
+        smartypants:
+        toc:
+            permalink: True
+
+
 **default**: `[]`
 
 [pymdk-extensions]: http://pythonhosted.org/Markdown/extensions/index.html
diff --git a/mkdocs/build.py b/mkdocs/build.py
index bda72820..cd29d3c3 100644
--- a/mkdocs/build.py
+++ b/mkdocs/build.py
@@ -28,11 +28,18 @@ def convert_markdown(markdown_source, site_navigation=None, extensions=(), stric
     """
 
     # Generate the HTML from the markdown source
+    if isinstance(extensions, dict):
+        user_extensions = list(extensions.keys())
+        extension_configs = dict([(k, v) for k, v in extensions.items() if isinstance(v, dict)])
+    else:
+        user_extensions = list(extensions)
+        extension_configs = {}
     builtin_extensions = ['meta', 'toc', 'tables', 'fenced_code']
     mkdocs_extensions = [RelativePathExtension(site_navigation, strict), ]
-    extensions = builtin_extensions + mkdocs_extensions + list(extensions)
+    extensions = set(builtin_extensions + mkdocs_extensions + user_extensions)
     md = markdown.Markdown(
-        extensions=extensions
+        extensions=extensions,
+        extension_configs=extension_configs
     )
     html_content = md.convert(markdown_source)
 

Support Markdown Extension Configs
Mkdocs uses Python-Markdown and offers support for users to specify extensions supported by Python-Markdown. However, currently mkdocs provides no way (sort-of; see below) to pass config settings into the extensions specified. For example, I would often like to use the [TOC][1] Extension's `permalink` feature to add the paragraph symbol (¶ or `&para;`) to the end of each header (`h1-6`) as a self-link. A very handy feature in documentation (in fact, it's used by Python-Markdown's docs, which I've linked to). Another use may be to customize how [syntax highlighting][2] works. Or non-english users may want to override the default substitutions used by [SmartyPants][3]. etc, etc...

Sure, mkdocs could hard-code some specific settings for things that make sense. Granted, not all extensions configs make sense in the context of mkdocs. But do you really want to be fielding bug reports for years to come asking for some additional config setting? And don't forget about [third party extensions][9]. Some of them (like a few of the math extensions) make a lot of sense for some users of mkdocs. But you couldn't possibly expect to provide good support for them without offering a holistic approach.

Interestingly, as mkdocs' config file is YAML and Python-Markdown's [`extension_configs`][4] keyword accepts a dictionary of dictionaries, it is pretty easy to replicate in the config file. Of note is the recent addition to Python-Markdown's CLI of support for a [YAML config file][5] for this very thing. One difference I would suggest is that, unlike the CLI feature, there should be no need to also provide a list of extensions separate from the extension configs.  I would expect the implementation to be something like this:

```python
if isinstance(config['markdown_extensions'], dict):
    extensions = config['markdown_extensions'].keys()
    extensions_configs = config['markdown_extensions']
else:
    # backward compat with old list type
    extensions = config['markdown_extensions']
    extensions_configs = {}

# then later in the code...
md = markdown.Markdown(
    extensions=extensions,
    extensions_configs = extensions_configs
)
html_content = md.convert(markdown_source)
```

Note that support for the existing list of extensions is still supported. The new behavior only happens when the config setting is of the dict type. And the new format in the config file would look something like this:

```yaml
markdown_extensions:
    markdown.extensions.toc:
        permalink: True
    markdown.extensions.codehilite:
        linenums: True
    markdown.extensions.smarty:
        smart_angled_quotes: True,
        substitutions:
            left-single-quote: '&sbquo;', 
            right-single-quote: '&lsquo;',
            left-double-quote: '&bdquo;',
            right-double-quote: '&ldquo;'
```

A few notes about this proposal:

1. Actually mkdocs does provide a method of sorts for passing in config settings which involves including the settings right in the name of the extension (see the [old docs][7]). However, that behavior is [deprecated][6] in Python-Markdown 2.6 (released yesterday) and was "pending deprecation" in 2.5. Even in older versions, it is very limited as no spaces are allowed and only string types could be used (booleans were tricky -- usually a 0 or 1 and then special code in the extension to call `int()` on the string). 

2. In previous versions of Python-Markdown (prior to version 2.5), the `extensions_configs` keyword expected a list of tuples for each extension rather than a dictionary (again see the [old docs][8]). That being the case, the earliest version of Python-Markdown this would work with is 2.5.

3. As of today, mkdocs only supports Python-Markdown version 2.4 as that was the last version to support Python 2.6 (see #165). However, dropping support for Python 2.6 appears to be earmarked for mkdoc 1.0.0 (0.12.0 is currently in development with 1.0.0 being the next milestone).

Given the above, I expect that this feature would be added to 1.0 at the earliest (although I understand if the desire is to not add any new features until after 1.0). Given that fact, I don't see much point in actually creating a pull request just yet (with tests and docs -- the code changes are pretty simple -- see above) as I'm not really interested in continually rebasing it until you guys are ready to accept it. That said, if the idea is accepted, I'll happily do the work when the time comes. If, on the other hand, you guys are not interested in adding support for this, I'll probably look for another project which fits my needs better (not having this is a non-starter for me).

[1]: https://pythonhosted.org/Markdown/extensions/toc.html#usage
[2]: https://pythonhosted.org/Markdown/extensions/code_hilite.html#usage
[3]: https://pythonhosted.org/Markdown/extensions/smarty.html
[4]: https://pythonhosted.org/Markdown/reference.html#extension_configs
[5]: https://pythonhosted.org/Markdown/cli.html#using-extensions
[6]: https://pythonhosted.org/Markdown/release-2.6.html#extension-configuration-as-part-of-extension-name-deprecated
[7]: https://github.com/waylan/Python-Markdown/blob/e4c13788f1c6f6f204ca7c471b25246f6c156832/docs/reference.txt#L91
[8]: https://github.com/waylan/Python-Markdown/blob/e4c13788f1c6f6f204ca7c471b25246f6c156832/docs/reference.txt#L107
[9]: https://github.com/waylan/Python-Markdown/wiki/Third-Party-Extensions
diff --git a/mkdocs/tests/build_tests.py b/mkdocs/tests/build_tests.py
index eaadf753..8c0808d5 100644
--- a/mkdocs/tests/build_tests.py
+++ b/mkdocs/tests/build_tests.py
@@ -320,3 +320,22 @@ class BuildTests(unittest.TestCase):
         self.assertRaises(
             MarkdownNotFound,
             build.convert_markdown, invalid, site_nav, strict=True)
+
+    def test_extension_config(self):
+        """
+        Test that a dictionary of 'markdown_extensions' is recognized as
+        both a list of extensions and a dictionary of extnesion configs.
+        """
+        markdown_extensions = {
+            'toc': {'permalink': True},
+            'meta': None  # This gets ignored as it is an invalid config
+        }
+        html, toc, meta = build.convert_markdown(dedent("""
+        # A Header
+        """), extensions=markdown_extensions)
+
+        expected_html = dedent("""
+        <h1 id="a-header">A Header<a class="headerlink" href="#a-header" title="Permanent link">&para;</a></h1>
+        """)
+
+        self.assertEqual(html.strip(), expected_html)

pip install -e .
parse_log_pytest
requirements.txt
nose coverage pytest
apt-get update apt-get install -y gcc
3.4
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
coverage==6.2
ghp-import==2.1.0
importlib-metadata==4.8.3
iniconfig==1.1.1
Jinja2==3.0.3
Markdown==3.3.7
MarkupSafe==2.0.1
-e git+https://github.com/mkdocs/mkdocs.git@a633d92852794d8d86c289bcafa9121d680b1ae9#egg=mkdocs
nose==1.3.7
packaging==21.3
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pytest==7.0.1
python-dateutil==2.9.0.post0
PyYAML==6.0.1
six==1.17.0
tomli==1.2.3
typing_extensions==4.1.1
watchdog==2.3.1
zipp==3.6.0

name: mkdocs
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - coverage==6.2
      - ghp-import==2.1.0
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - jinja2==3.0.3
      - markdown==3.3.7
      - markupsafe==2.0.1
      - nose==1.3.7
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - python-dateutil==2.9.0.post0
      - pyyaml==6.0.1
      - six==1.17.0
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - watchdog==2.3.1
      - zipp==3.6.0
prefix: /opt/conda/envs/mkdocs

mkdocs/tests/build_tests.py::BuildTests::test_extension_config
mkdocs/tests/build_tests.py::BuildTests::test_markdown_custom_extension
mkdocs/tests/build_tests.py::BuildTests::test_anchor_only_link mkdocs/tests/build_tests.py::BuildTests::test_convert_internal_asbolute_media mkdocs/tests/build_tests.py::BuildTests::test_convert_internal_link mkdocs/tests/build_tests.py::BuildTests::test_convert_internal_link_differing_directory mkdocs/tests/build_tests.py::BuildTests::test_convert_internal_link_with_anchor mkdocs/tests/build_tests.py::BuildTests::test_convert_internal_media mkdocs/tests/build_tests.py::BuildTests::test_convert_markdown mkdocs/tests/build_tests.py::BuildTests::test_convert_multiple_internal_links mkdocs/tests/build_tests.py::BuildTests::test_copying_media mkdocs/tests/build_tests.py::BuildTests::test_dont_convert_code_block_urls mkdocs/tests/build_tests.py::BuildTests::test_empty_document mkdocs/tests/build_tests.py::BuildTests::test_ignore_external_link mkdocs/tests/build_tests.py::BuildTests::test_markdown_duplicate_custom_extension mkdocs/tests/build_tests.py::BuildTests::test_markdown_fenced_code_extension mkdocs/tests/build_tests.py::BuildTests::test_markdown_table_extension mkdocs/tests/build_tests.py::BuildTests::test_not_use_directory_urls mkdocs/tests/build_tests.py::BuildTests::test_strict_mode_invalid mkdocs/tests/build_tests.py::BuildTests::test_strict_mode_valid
docs/user-guide/configuration.md mkdocs/build.py
docs/user-guide/configuration.md mkdocs/build.py