feat: enhance --blank scaffolding (#7310)

Merge pull request 7310
This commit is contained in:
jekyllbot
2018-10-12 06:57:45 -04:00
committed by GitHub
parent 1bb7f03e44
commit 37baaec83e
9 changed files with 63 additions and 6 deletions

View File

@@ -0,0 +1,3 @@
url: "" # the base hostname & protocol for your site, e.g. http://example.com
baseurl: "" # the subpath of your site, e.g. /blog
title: "" # the name of your site, e.g. ACME Corp.

View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="{{ site.lang | default: "en-US" }}">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>{{ page.title }} - {{ site.title }}</title>
<link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}">
</head>
<body>
{{ content}}
</body>
</html>

View File

@@ -0,0 +1,9 @@
$backgroundColor: #ffffff;
$bodyColor: #000000;
$bodyFont: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
body {
background: $backgroundColor;
color: $bodyColor;
font-family: $bodyFont;
}

View File

@@ -0,0 +1,4 @@
---
---
@import "main";

View File

@@ -0,0 +1,8 @@
---
layout: default
title: "Happy Jekyllin'!"
---
## You're ready to go!
Start developping your Jekyll website.

View File

@@ -41,10 +41,16 @@ module Jekyll
after_install(new_blog_path, options)
end
def blank_template
File.expand_path("../../blank_template", __dir__)
end
def create_blank_site(path)
FileUtils.cp_r blank_template + "/.", path
FileUtils.chmod_R "u+w", path
Dir.chdir(path) do
FileUtils.mkdir(%w(_layouts _posts _drafts))
FileUtils.touch("index.html")
FileUtils.mkdir(%w(_data _drafts _includes _posts))
end
end