docs.brew.sh updates

- Remove no longer needed `acme-challenge` file
- Set title, description, social image, logo, etc. for SEO
- Use extensionless permalinks (old links still work)
- Cleanup `_config.yml`
- Import latest `_layouts/base` from https://brew.sh
This commit is contained in:
Mike McQuaid 2018-02-22 18:47:29 +00:00
parent 14d54ed4b6
commit 977c3323d2
7 changed files with 65 additions and 38 deletions

View File

@ -1 +0,0 @@
CgQNmjNTd6fUriinp4XpuRI5PBGp7zEXbEEsQceSD0k.unNjkXuFqjKx4BO8gem4nzeMm1tSZxPPeBjNqQhFCqQ

View File

@ -80,7 +80,7 @@ When running `brew upgrade`, you see something like this:
$ brew upgrade $ brew upgrade
Error: undefined method `include?' for nil:NilClass Error: undefined method `include?' for nil:NilClass
Please report this bug: Please report this bug:
https://docs.brew.sh/Troubleshooting.html https://docs.brew.sh/Troubleshooting
/usr/local/Library/Homebrew/formula.rb:393:in `canonical_name' /usr/local/Library/Homebrew/formula.rb:393:in `canonical_name'
/usr/local/Library/Homebrew/formula.rb:425:in `factory' /usr/local/Library/Homebrew/formula.rb:425:in `factory'
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7 /usr/local/Library/Contributions/examples/brew-upgrade.rb:7

View File

@ -344,7 +344,7 @@ If you have already forked Homebrew on GitHub, then you can manually push (just
git push https://github.com/myname/homebrew-core/ <what-you-called-your-branch> git push https://github.com/myname/homebrew-core/ <what-you-called-your-branch>
``` ```
Now, [open a pull request](https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request.html) for your changes. Now, [open a pull request](https://docs.brew.sh/How-To-Open-a-Homebrew-Pull-Request) for your changes.
* One formula per commit; one commit per formula * One formula per commit; one commit per formula
* Keep merge commits out of the pull request * Keep merge commits out of the pull request

View File

@ -39,7 +39,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
* `analytics` [`state`]: * `analytics` [`state`]:
Display anonymous user behaviour analytics state. Display anonymous user behaviour analytics state.
Read more at <https://docs.brew.sh/Analytics.html>. Read more at <https://docs.brew.sh/Analytics>.
* `analytics` (`on`|`off`): * `analytics` (`on`|`off`):
Turn on/off Homebrew's analytics. Turn on/off Homebrew's analytics.
@ -212,7 +212,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
information on all installed formulae. information on all installed formulae.
See the docs for examples of using the JSON output: See the docs for examples of using the JSON output:
<https://docs.brew.sh/Querying-Brew.html> <https://docs.brew.sh/Querying-Brew>
* `install` [`--debug`] [`--env=`(`std`|`super`)] [`--ignore-dependencies`|`--only-dependencies`] [`--cc=``compiler`] [`--build-from-source`|`--force-bottle`] [`--devel`|`--HEAD`] [`--keep-tmp`] [`--build-bottle`] [`--force`] [`--verbose`] `formula` [`options` ...]: * `install` [`--debug`] [`--env=`(`std`|`super`)] [`--ignore-dependencies`|`--only-dependencies`] [`--cc=``compiler`] [`--build-from-source`|`--force-bottle`] [`--devel`|`--HEAD`] [`--keep-tmp`] [`--build-bottle`] [`--force`] [`--verbose`] `formula` [`options` ...]:
Install `formula`. Install `formula`.
@ -493,7 +493,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note
Pass `--installed` to get information on installed taps. Pass `--installed` to get information on installed taps.
See the docs for examples of using the JSON output: See the docs for examples of using the JSON output:
<https://docs.brew.sh/Querying-Brew.html> <https://docs.brew.sh/Querying-Brew>
* `tap-pin` `tap`: * `tap-pin` `tap`:
Pin `tap`, prioritizing its formulae over core when formula names are supplied Pin `tap`, prioritizing its formulae over core when formula names are supplied
@ -914,7 +914,7 @@ scripts that reside somewhere in the `PATH`, named `brew-``cmdname` or
to create your own commands without modifying Homebrew's internals. to create your own commands without modifying Homebrew's internals.
Instructions for creating your own commands can be found in the docs: Instructions for creating your own commands can be found in the docs:
<https://docs.brew.sh/External-Commands.html> <https://docs.brew.sh/External-Commands>
## SPECIFYING FORMULAE ## SPECIFYING FORMULAE
@ -1031,7 +1031,7 @@ can take several different forms:
*Default:* the number of available CPU cores. *Default:* the number of available CPU cores.
* `HOMEBREW_NO_ANALYTICS`: * `HOMEBREW_NO_ANALYTICS`:
If set, Homebrew will not send analytics. See: <https://docs.brew.sh/Analytics.html> If set, Homebrew will not send analytics. See: <https://docs.brew.sh/Analytics>
* `HOMEBREW_NO_AUTO_UPDATE`: * `HOMEBREW_NO_AUTO_UPDATE`:
If set, Homebrew will not auto-update before running `brew install`, If set, Homebrew will not auto-update before running `brew install`,

View File

@ -39,8 +39,8 @@ A few requests:
own fork. own fork.
- if still in doubt please ask for help and we'll help you out - if still in doubt please ask for help and we'll help you out
- please read: - please read:
- https://docs.brew.sh/Brew-Test-Bot-For-Core-Contributors.html - https://docs.brew.sh/Brew-Test-Bot-For-Core-Contributors
- https://docs.brew.sh/Maintainer-Guidelines.html - https://docs.brew.sh/Maintainer-Guidelines
- anything else you haven't read on https://docs.brew.sh - anything else you haven't read on https://docs.brew.sh
How does that sound? How does that sound?

View File

@ -1,17 +1,31 @@
include: [.well-known] title: Homebrew Documentation
exclude: [bin, vendor, CNAME, Gemfile, Gemfile.lock] description: Documentation for the missing package manager for macOS.
# Same as GitHub Pages exclude:
# https://help.github.com/articles/using-jekyll-with-pages#troubleshooting - bin
# Disable despite enabled on GitHub Pages for supported plugins to work. - CNAME
# safe: true - Gemfile*
kramdown: - README.md
input: GFM - vendor
hard_wrap: false
lsi: false
highlighter: rouge
gems: plugins:
- jekyll-feed - jekyll-feed
- jekyll-sitemap - jekyll-sitemap
- jekyll-seo-tag - jekyll-seo-tag
defaults:
- scope:
path: ""
values:
image: /img/homebrew-256x256.png
logo: /img/homebrew-256x256.png
github:
repository_nwo: Homebrew/brew
twitter:
username: MacHomebrew
facebook:
publisher: https://www.facebook.com/machomebrew/

View File

@ -1,13 +1,18 @@
{% assign t = site.data.locales[page.lang][page.lang] %}
<!DOCTYPE html> <!DOCTYPE html>
<html {% if page.direction == "rtl" %}dir="rtl" {% endif %}lang="{{ page.lang }}"> <html {% if page.direction == "rtl" %}dir="rtl" {% endif %}lang="{{ page.lang }}">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
{% if page.title %} {% if page.title %}
<title>{{ page.title }} — Homebrew</title> <title>{{ page.title }} — {{ site.title }}</title>
{% elsif page.direction == "rtl" %} {% elsif t.subtitle %}
<title>{{ page.subtitle }} — Homebrew</title> {% if page.direction == "rtl" %}
<title>{{ site.title }} — {{ t.subtitle }}</title>
{% else %} {% else %}
<title>Homebrew — {{ page.subtitle }}</title> <title>{{ t.subtitle }} — {{ t.subtitle }}</title>
{% endif %}
{% else %}
<title>{{ site.title }}</title>
{% endif %} {% endif %}
{% seo title=false %} {% seo title=false %}
{% feed_meta %} {% feed_meta %}
@ -16,6 +21,9 @@
<link rel="apple-touch-icon" href="/img/apple-touch-icon.png"> <link rel="apple-touch-icon" href="/img/apple-touch-icon.png">
<link rel="stylesheet" href="/css/screen.css" type="text/css" media="screen"> <link rel="stylesheet" href="/css/screen.css" type="text/css" media="screen">
<link rel="stylesheet" href="/css/pygments.css" type="text/css" media="screen"> <link rel="stylesheet" href="/css/pygments.css" type="text/css" media="screen">
{% if site.url == "http://localhost:4000" %}
<script src="https://github.com/Khan/tota11y/releases/download/0.1.3/tota11y.min.js"></script>
{% endif %}
<script> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@ -27,31 +35,37 @@
ga('send', 'pageview'); ga('send', 'pageview');
</script> </script>
{% for lang in site.langs %} {% if site.data.locales %}
{% if lang.langcode == "en" %} {% assign locales = site.data.locales | sort %}
{% for locale in locales %}
{% assign lang = locale[0] %}
{% if lang == "en" %}
<link rel="alternate" hreflang="en" href="{{ site.url }}" /> <link rel="alternate" hreflang="en" href="{{ site.url }}" />
<link rel="alternate" hreflang="x-default" href="{{ site.url }}" /> <link rel="alternate" hreflang="x-default" href="{{ site.url }}" />
{% else %} {% else %}
<link rel="alternate" hreflang="{{ lang.langcode }}" href="{{ lang.langcode | downcase | append: '.html' | prepend: '/index_' | prepend: site.url }}" /> <link rel="alternate" hreflang="{{ lang }}" href="{{ lang | prepend: '/index_' | prepend: site.url }}" />
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %}
</head> </head>
<body> <body>
<div id="wrap"> <div id="wrap">
<div id="header" class="{{ page.header-class }}"> <div id="header" class="{{ page.header-class }}">
<img alt="Homebrew logo" src="/img/homebrew-256x256.png" width="128" height="128"> <img alt="Homebrew logo" src="/img/homebrew-256x256.png" width="128" height="128">
<h1><a href="/">Homebrew</a></h1> <h1><a href="/">Homebrew</a></h1>
{% if page.subtitle %} {% if t.subtitle %}
<p id="subtitle"><strong>{{ page.subtitle }}</strong></p> <p id="subtitle"><strong>{{ t.subtitle }}</strong></p>
{% endif %} {% endif %}
{% if page.lang %} {% if page.lang %}
<select id="language" onchange="loadLanguage(this.options[this.selectedIndex].value)"> <select id="language" onchange="loadLanguage(this.options[this.selectedIndex].value)">
{% for lang in site.langs %} {% for locale in locales %}
{% if page.lang == lang.langcode %} {% assign lang = locale[0] %}
<option value="{{ lang.langcode | downcase }}" selected="selected">{{ lang.lang_string }}</option> {% assign locale_name = locale[1][lang].locale_name %}
{% if page.lang == lang %}
<option value="{{ lang }}" selected="selected">{{ locale_name }}</option>
{% else %} {% else %}
<option value="{{ lang.langcode | downcase }}">{{ lang.lang_string }}</option> <option value="{{ lang }}">{{ locale_name }}</option>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</select> </select>
@ -80,9 +94,9 @@
if (lang === {{ page.lang | jsonify }}) { if (lang === {{ page.lang | jsonify }}) {
return; return;
} else if (lang === "en") { } else if (lang === "en") {
window.location.replace("/"); window.location.assign("/");
} else { } else {
window.location.replace("/index_" + lang + ".html"); window.location.assign("/index_" + lang);
} }
} }
</script> </script>