Beispiel #1
0
    def test_new(self):

        tempdir = tempfile.mkdtemp()
        os.chdir(tempdir)

        new.new("myproject")

        expected_paths = [
            os.path.join(tempdir, "myproject"),
            os.path.join(tempdir, "myproject", "mkdocs.yml"),
            os.path.join(tempdir, "myproject", "docs"),
            os.path.join(tempdir, "myproject", "docs", "index.md"),
        ]

        for expected_path in expected_paths:
            self.assertTrue(os.path.exists(expected_path))
Beispiel #2
0
def new_command(project_directory):
    """Create a new MkDocs project"""
    new.new(project_directory)
Beispiel #3
0
def new_command(project_directory):
    """Create a new MkDocs project"""
    new.new(project_directory)
Beispiel #4
0
def new_command(project_directory):
    """Create a new MkDocs project"""
    from mkdocs.commands import new
    new.new(project_directory)