corrected windows.md (#6149)

Merge pull request 6149
This commit is contained in:
Henry Kobin 2017-06-18 04:27:41 -07:00 committed by jekyllbot
parent 6384724a09
commit 5ceef94c1b
1 changed files with 35 additions and 33 deletions

View File

@ -12,7 +12,8 @@ For older installations, this page aims to collect some of the general knowledge
*Please note:* You must have [Bash on Ubuntu on Windows](https://msdn.microsoft.com/en-us/commandline/wsl/about?f=255&MSPPError=-2147217396) enabled. *Please note:* You must have [Bash on Ubuntu on Windows](https://msdn.microsoft.com/en-us/commandline/wsl/about?f=255&MSPPError=-2147217396) enabled.
First let's make sure all our packages / repositories are up to date. Open a new Command Prompt instance, and type the following: First let's make sure all our packages / repositories are up to date.
Open a new Command Prompt instance, and type the following:
``` ```
bash bash
@ -42,13 +43,21 @@ Now all that is left to do is install Jekyll.
sudo gem install jekyll bundler sudo gem install jekyll bundler
``` ```
You can test by running: Check to see if your installation worked.
```
jekyll -v
```
**And that's it!**
To start a new project, just run:
``` ```
jekyll new my_project jekyll new my_project
``` ```
**And that's it!** replacing `my_project` with the name of your website.
If you `cd` into the folder, you can make sure time management is working by opening your `_posts` folder. You should see a markdown file with the current date listed. If you `cd` into the folder, you can make sure time management is working by opening your `_posts` folder. You should see a markdown file with the current date listed.
*Please note* Bash on Ubuntu on Windows is still under development, so you may run into issues. If you see an Auto-Regeneration error warning in your Bash instance, you can ignore it. *Please note* Bash on Ubuntu on Windows is still under development, so you may run into issues. If you see an Auto-Regeneration error warning in your Bash instance, you can ignore it.
@ -81,27 +90,8 @@ the site generation process. It can be done with the following command:
```sh ```sh
$ chcp 65001 $ chcp 65001
``` ```
Since Windows doesn't have a native source of zoneinfo data, the Ruby Interpreter would not understand IANA Timezones and hence using them had the `TZ` environment variable default to UTC/GMT 00:00.
Though Windows users could alternatively define their blog's timezone by setting the key to use POSIX format of defining timezones, it wasn't as user-friendly when it came to having the clock altered to changing DST-rules.
Jekyll now uses a rubygem to internally configure Timezone based on established [IANA Timezone Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). ## How to install github-pages (Chocolatey Method)
While 'new' blogs created with Jekyll v3.4 and greater, will have the following added to their 'Gemfile' by default, existing sites *will* have to update their 'Gemfile' (and installed) to enable development on Windows:
```ruby
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
```
As of v1.3.0, Jekyll uses the `listen` gem to watch for changes when the
`--watch` switch is specified during a build or serve. While `listen` has
built-in support for UNIX systems, it requires an extra gem for compatibility
with Windows. Add the following to the Gemfile for your site:
```ruby
gem 'wdm', '~> 0.1.0' if Gem.win_platform?
```
### How to install github-pages
This section is part of an article written by [Jens Willmer][jwillmerPost]. To follow the instructions you need to have [Chocolatey][] installed on your system. If you already have a version of Ruby installed you need to uninstall it before you can continue. This section is part of an article written by [Jens Willmer][jwillmerPost]. To follow the instructions you need to have [Chocolatey][] installed on your system. If you already have a version of Ruby installed you need to uninstall it before you can continue.
@ -172,6 +162,8 @@ In the future the installation process of the github-pages should be as simple a
[nokogiriReleases]: https://github.com/sparklemotion/nokogiri/releases "Nokogiri Releases" [nokogiriReleases]: https://github.com/sparklemotion/nokogiri/releases "Nokogiri Releases"
[nokogiriFails]: https://github.com/sparklemotion/nokogiri/issues/1456#issuecomment-206481794 "Nokogiri fails to install on Ruby 2.3 for Windows" [nokogiriFails]: https://github.com/sparklemotion/nokogiri/issues/1456#issuecomment-206481794 "Nokogiri fails to install on Ruby 2.3 for Windows"
## Installation via RubyInstaller ## Installation via RubyInstaller
RubyInstaller is a self-contained Windows-based installer that includes the Ruby language, an execution environment, important documentation, and more. RubyInstaller is a self-contained Windows-based installer that includes the Ruby language, an execution environment, important documentation, and more.
@ -180,17 +172,27 @@ RubyInstaller is a self-contained Windows-based installer that includes the Ruby
2. Install Jekyll and Bundler via a command prompt window: `gem install jekyll bundler` 2. Install Jekyll and Bundler via a command prompt window: `gem install jekyll bundler`
3. Check if the installation is accessible: `jekyll -v` 3. Check if the installation is accessible: `jekyll -v`
See [Autoinstall Jekyll for Windows](https://github.com/KeJunMao/fastjekyll#autoinstall-jekyll-for-windows) Optionally you can use [Autoinstall Jekyll for Windows](https://github.com/KeJunMao/fastjekyll#autoinstall-jekyll-for-windows).
### Auto-regeneration
Although jekyll would suggest: ## Time-Zone Management
Since Windows doesn't have a native source of zoneinfo data, the Ruby Interpreter would not understand IANA Timezones and hence using them had the `TZ` environment variable default to UTC/GMT 00:00.
Though Windows users could alternatively define their blog's timezone by setting the key to use POSIX format of defining timezones, it wasn't as user-friendly when it came to having the clock altered to changing DST-rules.
``` Jekyll now uses a rubygem to internally configure Timezone based on established [IANA Timezone Database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
Please add the following to your Gemfile to avoid polling for changes: While 'new' blogs created with Jekyll v3.4 and greater, will have the following added to their 'Gemfile' by default, existing sites *will* have to update their 'Gemfile' (and installed) to enable development on Windows:
gem 'wdm', '>= 0.1.0' if Gem.win_platform?
```ruby
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
``` ```
Auto-regeneration will work fine without including `gem 'wdm'` ## Auto Regeneration
As of v1.3.0, Jekyll uses the `listen` gem to watch for changes when the
`--watch` switch is specified during a build or serve. While `listen` has
built-in support for UNIX systems, it requires an extra gem for compatibility
with Windows. Add the following to the Gemfile for your site:
### [time-zone](/docs/windows/#timezone-management) ```ruby
gem 'wdm', '~> 0.1.0' if Gem.win_platform?
```