We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Deprecated --theme-dir is still listed as CLI option
Hey, I am busy migrating my project from v0.16.3 to v1.1 and it seems that the command line argument `-e / --theme-dir PATH` has been removed, I am defining a custom theme using the theme block and the `custom_dir` but the way we have things setup require us to use use the `--theme-dir` config as well, I don't suppose there is a replacement for that argument is there?

Thanks!

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `mkdocs/__main__.py`
Content:
```
1 #!/usr/bin/env python
2 
3 import os
4 import sys
5 import logging
6 import click
7 
8 # TODO: Remove this check at some point in the future.
9 # (also remove flake8's 'ignore E402' comments below)
10 if sys.version_info[0] < 3:  # pragma: no cover
11     raise ImportError('A recent version of Python 3 is required.')
12 
13 from mkdocs import __version__                            # noqa: E402
14 from mkdocs import utils                                  # noqa: E402
15 from mkdocs import exceptions                             # noqa: E402
16 from mkdocs import config                                 # noqa: E402
17 from mkdocs.commands import build, gh_deploy, new, serve  # noqa: E402
18 
19 log = logging.getLogger(__name__)
20 
21 
22 class State:
23     ''' Maintain logging level.'''
24 
25     def __init__(self, log_name='mkdocs', level=logging.INFO):
26         self.logger = logging.getLogger(log_name)
27         self.logger.propagate = False
28         stream = logging.StreamHandler()
29         formatter = logging.Formatter("%(levelname)-7s -  %(message)s ")
30         stream.setFormatter(formatter)
31         self.logger.addHandler(stream)
32 
33         self.logger.setLevel(level)
34 
35 
36 pass_state = click.make_pass_decorator(State, ensure=True)
37 
38 clean_help = "Remove old files from the site_dir before building (the default)."
39 config_help = "Provide a specific MkDocs config"
40 dev_addr_help = ("IP address and port to serve documentation locally (default: "
41                  "localhost:8000)")
42 strict_help = ("Enable strict mode. This will cause MkDocs to abort the build "
43                "on any warnings.")
44 theme_dir_help = "The theme directory to use when building your documentation."
45 theme_help = "The theme to use when building your documentation."
46 theme_choices = utils.get_theme_names()
47 site_dir_help = "The directory to output the result of the documentation build."
48 use_directory_urls_help = "Use directory URLs when building pages (the default)."
49 reload_help = "Enable the live reloading in the development server (this is the default)"
50 no_reload_help = "Disable the live reloading in the development server."
51 dirty_reload_help = "Enable the live reloading in the development server, but only re-build files that have changed"
52 commit_message_help = ("A commit message to use when committing to the "
53                        "Github Pages remote branch. Commit {sha} and MkDocs {version} are available as expansions")
54 remote_branch_help = ("The remote branch to commit to for Github Pages. This "
55                       "overrides the value specified in config")
56 remote_name_help = ("The remote name to commit to for Github Pages. This "
57                     "overrides the value specified in config")
58 force_help = "Force the push to the repository."
59 ignore_version_help = "Ignore check that build is not being deployed with an older version of MkDocs."
60 
61 
62 def add_options(opts):
63     def inner(f):
64         for i in reversed(opts):
65             f = i(f)
66         return f
67 
68     return inner
69 
70 
71 def verbose_option(f):
72     def callback(ctx, param, value):
73         state = ctx.ensure_object(State)
74         if value:
75             state.logger.setLevel(logging.DEBUG)
76     return click.option('-v', '--verbose',
77                         is_flag=True,
78                         expose_value=False,
79                         help='Enable verbose output',
80                         callback=callback)(f)
81 
82 
83 def quiet_option(f):
84     def callback(ctx, param, value):
85         state = ctx.ensure_object(State)
86         if value:
87             state.logger.setLevel(logging.ERROR)
88     return click.option('-q', '--quiet',
89                         is_flag=True,
90                         expose_value=False,
91                         help='Silence warnings',
92                         callback=callback)(f)
93 
94 
95 common_options = add_options([quiet_option, verbose_option])
96 common_config_options = add_options([
97     click.option('-f', '--config-file', type=click.File('rb'), help=config_help),
98     # Don't override config value if user did not specify --strict flag
99     # Conveniently, load_config drops None values
100     click.option('-s', '--strict', is_flag=True, default=None, help=strict_help),
101     click.option('-t', '--theme', type=click.Choice(theme_choices), help=theme_help),
102     click.option('-e', '--theme-dir', type=click.Path(), help=theme_dir_help),
103     # As with --strict, set the default to None so that this doesn't incorrectly
104     # override the config file
105     click.option('--use-directory-urls/--no-directory-urls', is_flag=True, default=None, help=use_directory_urls_help)
106 ])
107 
108 pgk_dir = os.path.dirname(os.path.abspath(__file__))
109 
110 
111 @click.group(context_settings={'help_option_names': ['-h', '--help']})
112 @click.version_option(
113     '{} from {} (Python {})'.format(__version__, pgk_dir, sys.version[:3]),
114     '-V', '--version')
115 @common_options
116 def cli():
117     """
118     MkDocs - Project documentation with Markdown.
119     """
120 
121 
122 @cli.command(name="serve")
123 @click.option('-a', '--dev-addr', help=dev_addr_help, metavar='<IP:PORT>')
124 @click.option('--livereload', 'livereload', flag_value='livereload', help=reload_help, default=True)
125 @click.option('--no-livereload', 'livereload', flag_value='no-livereload', help=no_reload_help)
126 @click.option('--dirtyreload', 'livereload', flag_value='dirty', help=dirty_reload_help)
127 @common_config_options
128 @common_options
129 def serve_command(dev_addr, livereload, **kwargs):
130     """Run the builtin development server"""
131 
132     logging.getLogger('tornado').setLevel(logging.WARNING)
133 
134     try:
135         serve.serve(
136             dev_addr=dev_addr,
137             livereload=livereload,
138             **kwargs
139         )
140     except (exceptions.ConfigurationError, OSError) as e:  # pragma: no cover
141         # Avoid ugly, unhelpful traceback
142         raise SystemExit('\n' + str(e))
143 
144 
145 @cli.command(name="build")
146 @click.option('-c', '--clean/--dirty', is_flag=True, default=True, help=clean_help)
147 @common_config_options
148 @click.option('-d', '--site-dir', type=click.Path(), help=site_dir_help)
149 @common_options
150 def build_command(clean, **kwargs):
151     """Build the MkDocs documentation"""
152 
153     try:
154         build.build(config.load_config(**kwargs), dirty=not clean)
155     except exceptions.ConfigurationError as e:  # pragma: no cover
156         # Avoid ugly, unhelpful traceback
157         raise SystemExit('\n' + str(e))
158 
159 
160 @cli.command(name="gh-deploy")
161 @click.option('-c', '--clean/--dirty', is_flag=True, default=True, help=clean_help)
162 @click.option('-m', '--message', help=commit_message_help)
163 @click.option('-b', '--remote-branch', help=remote_branch_help)
164 @click.option('-r', '--remote-name', help=remote_name_help)
165 @click.option('--force', is_flag=True, help=force_help)
166 @click.option('--ignore-version', is_flag=True, help=ignore_version_help)
167 @common_config_options
168 @click.option('-d', '--site-dir', type=click.Path(), help=site_dir_help)
169 @common_options
170 def gh_deploy_command(clean, message, remote_branch, remote_name, force, ignore_version, **kwargs):
171     """Deploy your documentation to GitHub Pages"""
172     try:
173         cfg = config.load_config(
174             remote_branch=remote_branch,
175             remote_name=remote_name,
176             **kwargs
177         )
178         build.build(cfg, dirty=not clean)
179         gh_deploy.gh_deploy(cfg, message=message, force=force, ignore_version=ignore_version)
180     except exceptions.ConfigurationError as e:  # pragma: no cover
181         # Avoid ugly, unhelpful traceback
182         raise SystemExit('\n' + str(e))
183 
184 
185 @cli.command(name="new")
186 @click.argument("project_directory")
187 @common_options
188 def new_command(project_directory):
189     """Create a new MkDocs project"""
190     new.new(project_directory)
191 
192 
193 if __name__ == '__main__':  # pragma: no cover
194     cli()
195
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/mkdocs/__main__.py b/mkdocs/__main__.py
--- a/mkdocs/__main__.py
+++ b/mkdocs/__main__.py
@@ -41,7 +41,6 @@
                  "localhost:8000)")
 strict_help = ("Enable strict mode. This will cause MkDocs to abort the build "
                "on any warnings.")
-theme_dir_help = "The theme directory to use when building your documentation."
 theme_help = "The theme to use when building your documentation."
 theme_choices = utils.get_theme_names()
 site_dir_help = "The directory to output the result of the documentation build."
@@ -99,7 +98,6 @@
     # Conveniently, load_config drops None values
     click.option('-s', '--strict', is_flag=True, default=None, help=strict_help),
     click.option('-t', '--theme', type=click.Choice(theme_choices), help=theme_help),
-    click.option('-e', '--theme-dir', type=click.Path(), help=theme_dir_help),
     # As with --strict, set the default to None so that this doesn't incorrectly
     # override the config file
     click.option('--use-directory-urls/--no-directory-urls', is_flag=True, default=None, help=use_directory_urls_help)

{"golden_diff": "diff --git a/mkdocs/__main__.py b/mkdocs/__main__.py\n--- a/mkdocs/__main__.py\n+++ b/mkdocs/__main__.py\n@@ -41,7 +41,6 @@\n                  \"localhost:8000)\")\n strict_help = (\"Enable strict mode. This will cause MkDocs to abort the build \"\n                \"on any warnings.\")\n-theme_dir_help = \"The theme directory to use when building your documentation.\"\n theme_help = \"The theme to use when building your documentation.\"\n theme_choices = utils.get_theme_names()\n site_dir_help = \"The directory to output the result of the documentation build.\"\n@@ -99,7 +98,6 @@\n     # Conveniently, load_config drops None values\n     click.option('-s', '--strict', is_flag=True, default=None, help=strict_help),\n     click.option('-t', '--theme', type=click.Choice(theme_choices), help=theme_help),\n-    click.option('-e', '--theme-dir', type=click.Path(), help=theme_dir_help),\n     # As with --strict, set the default to None so that this doesn't incorrectly\n     # override the config file\n     click.option('--use-directory-urls/--no-directory-urls', is_flag=True, default=None, help=use_directory_urls_help)\n", "issue": "Deprecated --theme-dir is still listed as CLI option\nHey, I am busy migrating my project from v0.16.3 to v1.1 and it seems that the command line argument `-e / --theme-dir PATH` has been removed, I am defining a custom theme using the theme block and the `custom_dir` but the way we have things setup require us to use use the `--theme-dir` config as well, I don't suppose there is a replacement for that argument is there?\r\n\r\nThanks!\n", "before_files": [{"content": "#!/usr/bin/env python\n\nimport os\nimport sys\nimport logging\nimport click\n\n# TODO: Remove this check at some point in the future.\n# (also remove flake8's 'ignore E402' comments below)\nif sys.version_info[0] < 3:  # pragma: no cover\n    raise ImportError('A recent version of Python 3 is required.')\n\nfrom mkdocs import __version__                            # noqa: E402\nfrom mkdocs import utils                                  # noqa: E402\nfrom mkdocs import exceptions                             # noqa: E402\nfrom mkdocs import config                                 # noqa: E402\nfrom mkdocs.commands import build, gh_deploy, new, serve  # noqa: E402\n\nlog = logging.getLogger(__name__)\n\n\nclass State:\n    ''' Maintain logging level.'''\n\n    def __init__(self, log_name='mkdocs', level=logging.INFO):\n        self.logger = logging.getLogger(log_name)\n        self.logger.propagate = False\n        stream = logging.StreamHandler()\n        formatter = logging.Formatter(\"%(levelname)-7s -  %(message)s \")\n        stream.setFormatter(formatter)\n        self.logger.addHandler(stream)\n\n        self.logger.setLevel(level)\n\n\npass_state = click.make_pass_decorator(State, ensure=True)\n\nclean_help = \"Remove old files from the site_dir before building (the default).\"\nconfig_help = \"Provide a specific MkDocs config\"\ndev_addr_help = (\"IP address and port to serve documentation locally (default: \"\n                 \"localhost:8000)\")\nstrict_help = (\"Enable strict mode. This will cause MkDocs to abort the build \"\n               \"on any warnings.\")\ntheme_dir_help = \"The theme directory to use when building your documentation.\"\ntheme_help = \"The theme to use when building your documentation.\"\ntheme_choices = utils.get_theme_names()\nsite_dir_help = \"The directory to output the result of the documentation build.\"\nuse_directory_urls_help = \"Use directory URLs when building pages (the default).\"\nreload_help = \"Enable the live reloading in the development server (this is the default)\"\nno_reload_help = \"Disable the live reloading in the development server.\"\ndirty_reload_help = \"Enable the live reloading in the development server, but only re-build files that have changed\"\ncommit_message_help = (\"A commit message to use when committing to the \"\n                       \"Github Pages remote branch. Commit {sha} and MkDocs {version} are available as expansions\")\nremote_branch_help = (\"The remote branch to commit to for Github Pages. This \"\n                      \"overrides the value specified in config\")\nremote_name_help = (\"The remote name to commit to for Github Pages. This \"\n                    \"overrides the value specified in config\")\nforce_help = \"Force the push to the repository.\"\nignore_version_help = \"Ignore check that build is not being deployed with an older version of MkDocs.\"\n\n\ndef add_options(opts):\n    def inner(f):\n        for i in reversed(opts):\n            f = i(f)\n        return f\n\n    return inner\n\n\ndef verbose_option(f):\n    def callback(ctx, param, value):\n        state = ctx.ensure_object(State)\n        if value:\n            state.logger.setLevel(logging.DEBUG)\n    return click.option('-v', '--verbose',\n                        is_flag=True,\n                        expose_value=False,\n                        help='Enable verbose output',\n                        callback=callback)(f)\n\n\ndef quiet_option(f):\n    def callback(ctx, param, value):\n        state = ctx.ensure_object(State)\n        if value:\n            state.logger.setLevel(logging.ERROR)\n    return click.option('-q', '--quiet',\n                        is_flag=True,\n                        expose_value=False,\n                        help='Silence warnings',\n                        callback=callback)(f)\n\n\ncommon_options = add_options([quiet_option, verbose_option])\ncommon_config_options = add_options([\n    click.option('-f', '--config-file', type=click.File('rb'), help=config_help),\n    # Don't override config value if user did not specify --strict flag\n    # Conveniently, load_config drops None values\n    click.option('-s', '--strict', is_flag=True, default=None, help=strict_help),\n    click.option('-t', '--theme', type=click.Choice(theme_choices), help=theme_help),\n    click.option('-e', '--theme-dir', type=click.Path(), help=theme_dir_help),\n    # As with --strict, set the default to None so that this doesn't incorrectly\n    # override the config file\n    click.option('--use-directory-urls/--no-directory-urls', is_flag=True, default=None, help=use_directory_urls_help)\n])\n\npgk_dir = os.path.dirname(os.path.abspath(__file__))\n\n\n@click.group(context_settings={'help_option_names': ['-h', '--help']})\n@click.version_option(\n    '{} from {} (Python {})'.format(__version__, pgk_dir, sys.version[:3]),\n    '-V', '--version')\n@common_options\ndef cli():\n    \"\"\"\n    MkDocs - Project documentation with Markdown.\n    \"\"\"\n\n\n@cli.command(name=\"serve\")\n@click.option('-a', '--dev-addr', help=dev_addr_help, metavar='<IP:PORT>')\n@click.option('--livereload', 'livereload', flag_value='livereload', help=reload_help, default=True)\n@click.option('--no-livereload', 'livereload', flag_value='no-livereload', help=no_reload_help)\n@click.option('--dirtyreload', 'livereload', flag_value='dirty', help=dirty_reload_help)\n@common_config_options\n@common_options\ndef serve_command(dev_addr, livereload, **kwargs):\n    \"\"\"Run the builtin development server\"\"\"\n\n    logging.getLogger('tornado').setLevel(logging.WARNING)\n\n    try:\n        serve.serve(\n            dev_addr=dev_addr,\n            livereload=livereload,\n            **kwargs\n        )\n    except (exceptions.ConfigurationError, OSError) as e:  # pragma: no cover\n        # Avoid ugly, unhelpful traceback\n        raise SystemExit('\\n' + str(e))\n\n\n@cli.command(name=\"build\")\n@click.option('-c', '--clean/--dirty', is_flag=True, default=True, help=clean_help)\n@common_config_options\n@click.option('-d', '--site-dir', type=click.Path(), help=site_dir_help)\n@common_options\ndef build_command(clean, **kwargs):\n    \"\"\"Build the MkDocs documentation\"\"\"\n\n    try:\n        build.build(config.load_config(**kwargs), dirty=not clean)\n    except exceptions.ConfigurationError as e:  # pragma: no cover\n        # Avoid ugly, unhelpful traceback\n        raise SystemExit('\\n' + str(e))\n\n\n@cli.command(name=\"gh-deploy\")\n@click.option('-c', '--clean/--dirty', is_flag=True, default=True, help=clean_help)\n@click.option('-m', '--message', help=commit_message_help)\n@click.option('-b', '--remote-branch', help=remote_branch_help)\n@click.option('-r', '--remote-name', help=remote_name_help)\n@click.option('--force', is_flag=True, help=force_help)\n@click.option('--ignore-version', is_flag=True, help=ignore_version_help)\n@common_config_options\n@click.option('-d', '--site-dir', type=click.Path(), help=site_dir_help)\n@common_options\ndef gh_deploy_command(clean, message, remote_branch, remote_name, force, ignore_version, **kwargs):\n    \"\"\"Deploy your documentation to GitHub Pages\"\"\"\n    try:\n        cfg = config.load_config(\n            remote_branch=remote_branch,\n            remote_name=remote_name,\n            **kwargs\n        )\n        build.build(cfg, dirty=not clean)\n        gh_deploy.gh_deploy(cfg, message=message, force=force, ignore_version=ignore_version)\n    except exceptions.ConfigurationError as e:  # pragma: no cover\n        # Avoid ugly, unhelpful traceback\n        raise SystemExit('\\n' + str(e))\n\n\n@cli.command(name=\"new\")\n@click.argument(\"project_directory\")\n@common_options\ndef new_command(project_directory):\n    \"\"\"Create a new MkDocs project\"\"\"\n    new.new(project_directory)\n\n\nif __name__ == '__main__':  # pragma: no cover\n    cli()\n", "path": "mkdocs/__main__.py"}], "after_files": [{"content": "#!/usr/bin/env python\n\nimport os\nimport sys\nimport logging\nimport click\n\n# TODO: Remove this check at some point in the future.\n# (also remove flake8's 'ignore E402' comments below)\nif sys.version_info[0] < 3:  # pragma: no cover\n    raise ImportError('A recent version of Python 3 is required.')\n\nfrom mkdocs import __version__                            # noqa: E402\nfrom mkdocs import utils                                  # noqa: E402\nfrom mkdocs import exceptions                             # noqa: E402\nfrom mkdocs import config                                 # noqa: E402\nfrom mkdocs.commands import build, gh_deploy, new, serve  # noqa: E402\n\nlog = logging.getLogger(__name__)\n\n\nclass State:\n    ''' Maintain logging level.'''\n\n    def __init__(self, log_name='mkdocs', level=logging.INFO):\n        self.logger = logging.getLogger(log_name)\n        self.logger.propagate = False\n        stream = logging.StreamHandler()\n        formatter = logging.Formatter(\"%(levelname)-7s -  %(message)s \")\n        stream.setFormatter(formatter)\n        self.logger.addHandler(stream)\n\n        self.logger.setLevel(level)\n\n\npass_state = click.make_pass_decorator(State, ensure=True)\n\nclean_help = \"Remove old files from the site_dir before building (the default).\"\nconfig_help = \"Provide a specific MkDocs config\"\ndev_addr_help = (\"IP address and port to serve documentation locally (default: \"\n                 \"localhost:8000)\")\nstrict_help = (\"Enable strict mode. This will cause MkDocs to abort the build \"\n               \"on any warnings.\")\ntheme_help = \"The theme to use when building your documentation.\"\ntheme_choices = utils.get_theme_names()\nsite_dir_help = \"The directory to output the result of the documentation build.\"\nuse_directory_urls_help = \"Use directory URLs when building pages (the default).\"\nreload_help = \"Enable the live reloading in the development server (this is the default)\"\nno_reload_help = \"Disable the live reloading in the development server.\"\ndirty_reload_help = \"Enable the live reloading in the development server, but only re-build files that have changed\"\ncommit_message_help = (\"A commit message to use when committing to the \"\n                       \"Github Pages remote branch. Commit {sha} and MkDocs {version} are available as expansions\")\nremote_branch_help = (\"The remote branch to commit to for Github Pages. This \"\n                      \"overrides the value specified in config\")\nremote_name_help = (\"The remote name to commit to for Github Pages. This \"\n                    \"overrides the value specified in config\")\nforce_help = \"Force the push to the repository.\"\nignore_version_help = \"Ignore check that build is not being deployed with an older version of MkDocs.\"\n\n\ndef add_options(opts):\n    def inner(f):\n        for i in reversed(opts):\n            f = i(f)\n        return f\n\n    return inner\n\n\ndef verbose_option(f):\n    def callback(ctx, param, value):\n        state = ctx.ensure_object(State)\n        if value:\n            state.logger.setLevel(logging.DEBUG)\n    return click.option('-v', '--verbose',\n                        is_flag=True,\n                        expose_value=False,\n                        help='Enable verbose output',\n                        callback=callback)(f)\n\n\ndef quiet_option(f):\n    def callback(ctx, param, value):\n        state = ctx.ensure_object(State)\n        if value:\n            state.logger.setLevel(logging.ERROR)\n    return click.option('-q', '--quiet',\n                        is_flag=True,\n                        expose_value=False,\n                        help='Silence warnings',\n                        callback=callback)(f)\n\n\ncommon_options = add_options([quiet_option, verbose_option])\ncommon_config_options = add_options([\n    click.option('-f', '--config-file', type=click.File('rb'), help=config_help),\n    # Don't override config value if user did not specify --strict flag\n    # Conveniently, load_config drops None values\n    click.option('-s', '--strict', is_flag=True, default=None, help=strict_help),\n    click.option('-t', '--theme', type=click.Choice(theme_choices), help=theme_help),\n    # As with --strict, set the default to None so that this doesn't incorrectly\n    # override the config file\n    click.option('--use-directory-urls/--no-directory-urls', is_flag=True, default=None, help=use_directory_urls_help)\n])\n\npgk_dir = os.path.dirname(os.path.abspath(__file__))\n\n\n@click.group(context_settings={'help_option_names': ['-h', '--help']})\n@click.version_option(\n    '{} from {} (Python {})'.format(__version__, pgk_dir, sys.version[:3]),\n    '-V', '--version')\n@common_options\ndef cli():\n    \"\"\"\n    MkDocs - Project documentation with Markdown.\n    \"\"\"\n\n\n@cli.command(name=\"serve\")\n@click.option('-a', '--dev-addr', help=dev_addr_help, metavar='<IP:PORT>')\n@click.option('--livereload', 'livereload', flag_value='livereload', help=reload_help, default=True)\n@click.option('--no-livereload', 'livereload', flag_value='no-livereload', help=no_reload_help)\n@click.option('--dirtyreload', 'livereload', flag_value='dirty', help=dirty_reload_help)\n@common_config_options\n@common_options\ndef serve_command(dev_addr, livereload, **kwargs):\n    \"\"\"Run the builtin development server\"\"\"\n\n    logging.getLogger('tornado').setLevel(logging.WARNING)\n\n    try:\n        serve.serve(\n            dev_addr=dev_addr,\n            livereload=livereload,\n            **kwargs\n        )\n    except (exceptions.ConfigurationError, OSError) as e:  # pragma: no cover\n        # Avoid ugly, unhelpful traceback\n        raise SystemExit('\\n' + str(e))\n\n\n@cli.command(name=\"build\")\n@click.option('-c', '--clean/--dirty', is_flag=True, default=True, help=clean_help)\n@common_config_options\n@click.option('-d', '--site-dir', type=click.Path(), help=site_dir_help)\n@common_options\ndef build_command(clean, **kwargs):\n    \"\"\"Build the MkDocs documentation\"\"\"\n\n    try:\n        build.build(config.load_config(**kwargs), dirty=not clean)\n    except exceptions.ConfigurationError as e:  # pragma: no cover\n        # Avoid ugly, unhelpful traceback\n        raise SystemExit('\\n' + str(e))\n\n\n@cli.command(name=\"gh-deploy\")\n@click.option('-c', '--clean/--dirty', is_flag=True, default=True, help=clean_help)\n@click.option('-m', '--message', help=commit_message_help)\n@click.option('-b', '--remote-branch', help=remote_branch_help)\n@click.option('-r', '--remote-name', help=remote_name_help)\n@click.option('--force', is_flag=True, help=force_help)\n@click.option('--ignore-version', is_flag=True, help=ignore_version_help)\n@common_config_options\n@click.option('-d', '--site-dir', type=click.Path(), help=site_dir_help)\n@common_options\ndef gh_deploy_command(clean, message, remote_branch, remote_name, force, ignore_version, **kwargs):\n    \"\"\"Deploy your documentation to GitHub Pages\"\"\"\n    try:\n        cfg = config.load_config(\n            remote_branch=remote_branch,\n            remote_name=remote_name,\n            **kwargs\n        )\n        build.build(cfg, dirty=not clean)\n        gh_deploy.gh_deploy(cfg, message=message, force=force, ignore_version=ignore_version)\n    except exceptions.ConfigurationError as e:  # pragma: no cover\n        # Avoid ugly, unhelpful traceback\n        raise SystemExit('\\n' + str(e))\n\n\n@cli.command(name=\"new\")\n@click.argument(\"project_directory\")\n@common_options\ndef new_command(project_directory):\n    \"\"\"Create a new MkDocs project\"\"\"\n    new.new(project_directory)\n\n\nif __name__ == '__main__':  # pragma: no cover\n    cli()\n", "path": "mkdocs/__main__.py"}]}