@@ -79,23 +79,6 @@ if ($args) {
79
79
Split-Path |
80
80
Push-Location
81
81
}
82
- if (-not (Test-Path ' ./Gemfile' )) {
83
- $defaultGemFile = @ (
84
- " source 'https://rubygems.org'"
85
- " gem 'jekyll', '~> $ ( (jekyll -- version) -replace ' ^jekyll\s' -replace ' \s' ) '"
86
- if ($env: JekyllThemeName -and $env: JekyllThemeVersion ) {
87
- " gem '$env: JekyllThemeName ', '~> $env: JekyllThemeVersion '"
88
- } else {
89
- ' gem "minima", "~> 2.5"'
90
- }
91
- " group :jejkyll_plugins do"
92
- " gem 'jekyll-feed', '~> 0.12'"
93
- " end"
94
- ' gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]'
95
- ) -join [Environment ]::newline
96
- Set-Content - Path ' ./Gemfile' - Value $defaultGemFile
97
- }
98
-
99
82
$jekyllJob = Start-PSJekyll
100
83
while ($jekyllJob.State -notin ' Completed' , ' Failed' ) {
101
84
Start-Sleep - Milliseconds (Get-Random - Min 1000 - Max 10000 )
@@ -115,7 +98,10 @@ if ($args) {
115
98
{
116
99
# If a single drive is mounted, start the Jekyll server.
117
100
if ($mountedFolders.Length -eq 1 ) {
118
- Push-Location $mountedFolders [0 ].Fullname
101
+ Push-Location $mountedFolders [0 ].Fullname
102
+ Start-PSJekyll
103
+ } elseif ($psJekyll.CurrentSite ) {
104
+ Push-Location $psJekyll.CurrentSite.Directory.FullName
119
105
Start-PSJekyll
120
106
}
121
107
}
0 commit comments