8000 Move documentation to docs folder by benbalter · Pull Request #5459 · jekyll/jekyll · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Move documentation to docs folder #5459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 2, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def docs_name
"#{name}-docs"
end

def docs_folder
"docs"
end

def gemspec_file
"#{name}.gemspec"
end
Expand Down Expand Up @@ -102,7 +106,7 @@ def siteify_file(file, overrides_front_matter = {})
"note" => "This file is autogenerated. Edit /#{file} instead."
}.merge(overrides_front_matter)
contents = "#{front_matter.to_yaml}---\n\n#{content_for(file)}"
File.write("site/_docs/#{slug}.md", contents)
File.write("#{docs_folder}/_docs/#{slug}.md", contents)
end

def content_for(file)
Expand Down
F438
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion site/_config.yml → docs/_config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
markdown: kramdown
highlighter: rouge
permalink: /news/:year/:month/:day/:title/

gauges_id: 503c5af6613f5d0f19000027
google_analytics_id: UA-50755011-1
Expand All @@ -14,6 +13,9 @@ timezone: America/Los_Angeles
collections:
docs:
output: true
posts:
permalink: /news/:year/:month/:day/:title/
output: true

name: Jekyll • Simple, blog-aware, static sites
Copy link
Contributor
@zlatanvasovic zlatanvasovic Nov 2, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be escaped as ·? I've just noticed this, I know it's not related to the actual commit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if it's causing an issue at all? I kind of like the UTF-8 dot. 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be OK since the HTML files are using utf-8.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, it's fine. The old browsers such as IE6/7 (I am unsure for others) had character-encoding problems, but nobody uses them anymore. Keep the cool character as is. ⛱️

description: Transform your plain text into static websites and blogs
Expand Down
1 change: 1 addition & 0 deletions site/_data/docs.yml → docs/_data/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@
- title: Meta
docs:
- contributing
- maintaining
- conduct
- history
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Affinity Team Captains
---
title: Affinity Team Captains
layout: docs
---

**This guide is for affinity team captains.** These special people are **team maintainers** of one of our [affinity teams][] and help triage and evaluate the issues and contributions of others. You may find what is written here interesting, but it’s definitely not for everyone.
{: .note .info }

## Affinity teams & their captains

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Maintainers: Avoiding Burnout
---
title: "Avoiding Burnout"
layout: docs
---

**This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but it’s definitely not for everyone.
{: .note .info }

# 1. Use Jekyll

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Contributors: Becoming a Maintainer
---
title: "Becoming a Maintainer"
layout: docs
---

**This guide is for contributors.** These special people have contributed to one or more of Jekyll's repositories, but do not yet have write access to any. You may find what is written here interesting, but it’s definitely not for everyone.
{: .note .info }

So you want to become a maintainer of a Jekyll project? We'd love to have you! Here are some things we like to see from community members before we promote them to maintainers.

Expand Down
21 changes: 21 additions & 0 deletions docs/_docs/maintaining/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
layout: docs
title: Maintaining Jekyll
permalink: /docs/maintaining/
---

**This guide is for Jekyll contributors and maintainers.** These special people contribute to one or more of Jekyll's repositories or help merge the contributions of others. You may find what is written here interesting, but it’s definitely not for everyone.
{: .note .info }

Hello! This is where we document various processes for maintaining Jekyll. Being a maintainer for any Jekyll project is a big responsibility, so we put together some helpful documentation for various tasks you might do as a maintainer.

1. [Affinity teams & their captains](affinity-team-captain/)
2. [Triaging and issue](triaging-an-issue/)
3. [Reviewing a pull request](reviewing-a-pull-request/)
4. [Merging a pull request](merging-a-pull-request/)
5. [Avoiding burnout](avoiding-burnout/)
6. [Special Labels](special-labels/)

Interested in becoming a maintainer? Here is some documentation for **contributors**:

1. [Becoming a maintainer](becoming-a-maintainer/)
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Maintainers: Merging a Pull Request
---
title: "Merging a Pull Request"
layout: docs
---

**This guide 10000 is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but it’s definitely not for everyone.
{: .note .info }

## Code Review

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Maintainers: Reviewing a Pull Request
---
title: "Reviewing a Pull Request"
layout: docs
---

**This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but it’s definitely not for everyone.
{: .note .info }

## Respond Kindly

Expand Down Expand Up @@ -41,4 +45,3 @@ A pull request may be merged once two maintainers have reviewed the pull request
## Think Security

We owe it to our users to ensure that using a theme from the community or building someone else's site doesn't come with built-in security vulnerabilities. Things like where files may be read from and written to are important to keep secure. Jekyll is also the basis for hosted services such as [GitHub Pages](https://pages.github.com), which cannot upgrade when security issues are introduced.

Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Maintainers: Special Labels
---
title: "Special Labels"
layout: docs
---

**This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but it’s definitely not for everyone.
{: .note .info }

We use a series of "special labels" on GitHub.com to automate handling of some parts of the pull request and issue process. @jekyllbot may automatically apply or remove certain labels based on actions taken by users or maintainers. Below are the labels and how they work:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Maintainers: Triaging an Issue
---
title: "Triaging an Issue"
layout: docs
---

**This guide is for maintainers.** These special people have **write access** to one or more of Jekyll's repositories and help merge the contributions of others. You may find what is written here interesting, but it’s definitely not for everyone.
{: .note .info }

Before evaluating an issue, it is important to identify if it is a feature
request or a bug. For the Jekyll project the following definitions are used
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 5 additions & 2 deletions site/_docs/windows.md → docs/_docs/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ A quick way to install Jekyll is to follow the [installation instructions by Dav
2. Install Ruby via Chocolatey: `choco install ruby -y`
3. Reopen a command prompt and install Jekyll: `gem install jekyll`

For a more conventional way of installing Jekyll you can follow the [installation instruction by Julian Thilo][windows-installation]. The instructions were written for Ruby 2.0.0, but should work for later
versions [prior to 2.2][hitimes-issue].
For a more conventional way of installing Jekyll you can follow the [installation instructions by Sverrir Sigmundarson][windows-installjekyll3]. These instructions are for newer versions of Ruby 2.2.5 and Jekyll 3.

For instructions for older versions of Ruby 2.0.0 ([prior to 2.2][hitimes-issue]) and Jekyll 2 and older you should follow the [installation instruction by Julian Thilo][windows-installation].


## Encoding

Expand All @@ -34,6 +36,7 @@ $ chcp 65001
```

[windows-installation]: http://jekyll-windows.juthilo.com/
[windows-installjekyll3]: https://labs.sverrirs.com/jekyll/
[hitimes-issue]: https://github.com/copiousfreetime/hitimes/issues/40

## Auto-regeneration
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 12 additions & 9 deletions docs/readme.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Maintaining Jekyll
# Jekyll docs site

Hello! This is where we document various processes for maintaining Jekyll. Being a maintainer for any Jekyll project is a big responsibility, so we put together some helpful documentation for various tasks you might do as a maintainer.
This directory contains the code for the Jekyll docs site, [jekyllrb.com](http://jekyllrb.com/).

1. [Triaging and issue](triaging-an-issue.md)
2. [Reviewing a pull request](reviewing-a-pull-request.md)
3. [Merging a pull request](merging-a-pull-request.md)
4. [Avoiding burnout](avoiding-burnout.md)
5. [Special Labels](special-labels.md)
## Contributing

Interested in becoming a maintainer? Here is some documentation for **contributors**:
For information about contributing, see the [Contributing page](http://jekyllrb.com/docs/contributing/).

1. [Becoming a maintainer](becoming-a-maintainer.md)
## Running locally

You can preview your contributions before opening a pull request by running from within the directory:

1. `bundle install --without test test_legacy benchmark`
2. `bundle exec rake site:preview`

It's just a jekyll site, afterall! :wink:
File renamed without changes.
File renamed without changes.
76 changes: 16 additions & 60 deletions rake/site.rake
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ namespace :site do
require "launchy"
require "jekyll"

# Yep, it's a hack! Wait a few seconds for the Jekyll site to generate and
# then open it in a browser. Someday we can do better than this, I hope.
Thread.new do
sleep 4
puts "Opening in browser..."
browser_launched = false
Jekyll::Hooks.register :site, :post_write do |site|
next if browser_launched
browser_launched = true
Jekyll.logger.info "Opening in browser..."
Launchy.open("http://localhost:4000")
end

# Generate the site in server mode.
puts "Running Jekyll..."
options = {
"source" => File.expand_path("site"),
"destination" => File.expand_path("site/_site"),
"source" => File.expand_path(docs_folder),
"destination" => File.expand_path("#{docs_folder}/_site"),
"watch" => true,
"serving" => true
}
Expand All @@ -36,70 +36,26 @@ namespace :site do
task :generate => :generated_pages do
require "jekyll"
Jekyll::Commands::Build.process({
"profile" => true,
"source" => File.expand_path("site"),
"destination" => File.expand_path("site/_site")
"profile" => true,
"source" => File.expand_path(docs_folder),
"destination" => File.expand_path("#{docs_folder}/_site")
})
end
task :build => :generate

desc "Update normalize.css library to the latest version and minify"
task :update_normalize_css do
Dir.chdir("site/_sass") do
Dir.chdir("#{docs_folder}/_sass") do
sh 'curl "http://necolas.github.io/normalize.css/latest/normalize.css" -o "normalize.scss"'
sh 'sass "normalize.scss":"_normalize.scss" --style compressed'
rm ['normalize.scss', Dir.glob('*.map')].flatten
end
end

desc "Commit the local site to the gh-pages branch and publish to GitHub Pages"
desc "Generate generated pages and publish to GitHub Pages"
task :publish => :generated_pages do
# Ensure the gh-pages dir exists so we can generate into it.
puts "Checking for gh-pages dir..."
unless File.exist?("./gh-pages")
puts "Creating gh-pages dir..."
sh "git clone git@github.com:jekyll/jekyll gh-pages"
end

# Ensure latest gh-pages branch history.
Dir.chdir('gh-pages') do
sh "git checkout gh-pages"
sh "git pull origin gh-pages"
end

# Proceed to purge all files in case we removed a file in this release.
puts "Cleaning gh-pages directory..."
purge_exclude = %w[
gh-pages/.
gh-pages/..
gh-pages/.git
gh-pages/.gitignore
]
FileList["gh-pages/{*,.*}"].exclude(*purge_exclude).each do |path|
sh "rm -rf #{path}"
end

# Copy site to gh-pages dir.
puts "Building site into gh-pages branch..."
ENV['JEKYLL_ENV'] = 'production'
require "jekyll"
Jekyll::Commands::Build.process({
"source" => File.expand_path("site"),
"destination" => File.expand_path("gh-pages"),
"sass" => { "style" => "compressed" }
})

File.open('gh-pages/.nojekyll', 'wb') { |f| f.puts(":dog: food.") }

# Commit and push.
puts "Committing and pushing to GitHub Pages..."
sha = `git rev-parse HEAD`.strip
Dir.chdir('gh-pages') do
sh "git add ."
sh "git commit --allow-empty -m 'Updating to #{sha}.'"
sh "git push origin gh-pages"
end
puts 'Done.'
puts "GitHub Pages now compiles our docs site on every push to the `master` branch. Cool, huh?"
exit 1
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed. I'll just change the settings so it uses master /docs.


desc "Create a nicely formatted history page for the jekyll site based on the repo history."
Expand All @@ -123,7 +79,7 @@ namespace :site do

desc "Write the site latest_version.txt file"
task :version_file do
File.open('site/latest_version.txt', 'wb') { |f| f.puts(version) } unless version =~ /(beta|rc|alpha)/i
File.open("#{docs_folder}/latest_version.txt", 'wb') { |f| f.puts(version) } unless version =~ /(beta|rc|alpha)/i
end

namespace :releases do
Expand All @@ -132,7 +88,7 @@ namespace :site do
raise "Specify a version: rake site:releases:new['1.2.3']" unless args.version
today = Time.new.strftime('%Y-%m-%d')
release = args.version.to_s
filename = "site/_posts/#{today}-jekyll-#{release.split('.').join('-')}-released.markdown"
filename = "#{docs_folder}/_posts/#{today}-jekyll-#{release.split('.').join('-')}-released.markdown"

File.open(filename, "wb") do |post|
post.puts("---")
Expand Down
16 changes: 0 additions & 16 deletions site/README.md

This file was deleted.

0