This repository has been archived by the owner. It is now read-only.

Use jekyll in the webpages #18972

Closed
wants to merge 1 commit into
base: gh-pages
from
Jump to file or symbol
Failed to load files and symbols.
+291 −604
Diff settings

Always

Just for now

Copy path View file
@@ -0,0 +1 @@
_site
Copy path View file
@@ -0,0 +1,17 @@
#Homebrew webpage
The webpage uses [jekyll](https://github.com/mojombo/jekyll). The template for the index is at layouts/index.html.
##Translations
If you want to add a new translation follow these steps:
1. In _config.yml append this:
```
- langcode: {the_lang_code}
lang_string: {the_link_string}
```
2. Copy index.html as index_{langcode}.html
3. Change the values of the strings to the translated strings.
You can see the translated webpage running `jekyll --server` and opening http://localhost:4000/
Copy path View file
@@ -0,0 +1,9 @@
langs:
- langcode: en
lang_string: English Version
- langcode: fr-fr
lang_string: Version Francaise
- langcode: zh-cn
lang_string: 简体中文版
- langcode: zh-tw
lang_string: 繁體中文版
Copy path View file
@@ -0,0 +1,163 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>{{ page.title }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="dc.creator" content="Rémi Prévost - http://exomel.com" />
<link rel="stylesheet" href="./css/screen.css" type="text/css" media="screen" />
<link rel="stylesheet" href="./css/fonts/chunkfive/chunkfive.css" type="text/css" media="screen" />
<script type="text/javascript">
function selectText() {
if (document.selection) {
var range = document.body.createTextRange();
range.moveToElementText(document.getElementById('selectable'));
range.select();
} else if (window.getSelection) {
var range = document.createRange();
range.selectNode(document.getElementById('selectable'));
window.getSelection().addRange(range);
}
}
</script>
</head>
<body>
<div id="wrap">
<div id="header">
<h1><a href="./">Homebrew</a></h1>
<p id="subtitle"><strong>{{ page.subtitle }}</strong></p>
<p>{% for lang in site.langs %}
{% if page.lang == lang.langcode %}
{{ lang.lang_string }}
{% else %}
<a href={% if lang.langcode == 'en' %}"index.html"{% else %}"index_{{ lang.langcode }}.html"{% endif %}>
{{ lang.lang_string }}
</a>
{% endif %}
{% unless forloop.last %}
|
{% endunless %}
{% endfor %}
</p>
</div>
<div id="informations">
<ul>
<li>
<div class="group row">
<div class="col-1">
<p>{{ page.pagecontent.what }}</p>
</div>
<div class="col-2">
<pre><code><span style="color: #e3d796;">$</span> brew install wget</code></pre>
</div>
</div>
</li>
<li>
<div class="group row">
<div class="col-1">
<p>{{ page.pagecontent.how }}</p>
</div>
<div class="col-2">
<pre><code><span style="color: #e3d796;">$</span> cd /usr/local
<span style="color: #e3d796;">$</span> find Cellar
Cellar/wget/1.12
Cellar/wget/1.12/bin/wget
Cellar/wget/1.12/share/man/man1/wget.1
<span style="color: #e3d796;">$</span> ls -l bin
bin/wget -&gt; ../Cellar/wget/1.12/bin/wget</code></pre>
</div>
</div>
</li>
<li>
<div class="group row">
<div class="col-1">
<p>{{ page.pagecontent.prefix }}</p>
</div>
</div>
</li>
<li>
<div class="group row">
<div class="col-1">
<p>{{ page.pagecontent.createpackages }}</p>
</div>
<div class="col-2">
<pre><code><span style="color: #e3d796;">$</span> brew create http://foo.com/bar-1.0.tgz
Created /usr/local/Library/Formula/bar.rb
</code></pre>
</div>
</div>
</li>
<li>
<div class="group row">
<div class="col-1">
<p>{{ page.pagecontent.hack }}</p>
</div>
<div class="col-2">
<pre><code><span style="color: #e3d796;">$</span> brew edit wget <span style="color: #666;"># opens in $EDITOR!</span></code></pre>
</div>
</div>
</li>
<li>
<div class="group row">
<div class="col-1">
<p>{{ page.pagecontent.formula }}</p>
</div>
<div class="col-2">
<pre class="overflow"><code><span style="color: #8a9597;">require</span> <span style="color: #c2c98f;">'</span><span style="color: #a2a96f;">formula</span><span style="color: #c2c98f;">'</span>
<span style="color: #8a9597;">class</span> <span style="color: #e3d796;"><em>Wget</em></span&lt; Formula
  homepage <span style="color: #c2c98f;">'</span><span style="color: #a2a96f;">http://www.gnu.org/wget/</span><span style="color: #c2c98f;">'</span>
  url <span style="color: #c2c98f;">'</span><span style="color: #a2a96f;">http://ftp.gnu.org/wget-1.12.tar.gz</span><span style="color: #c2c98f;">'</span>
  md5 <span style="color: #c2c98f;">'</span><span style="color: #a2a96f;">308a5476fc096a8a525d07279a6f6aa3</span><span style="color: #c2c98f;">'</span>
  <span style="color: #8a9597;">def</span> <span style="color: #a999ac;">install</span>
    system <span style="color: #c2c98f;">"</span><span style="color: #a2a96f;">./configure</span><span style="color: #c2c98f;"> </span><span style="color: #a2a96f;">--prefix=</span><span style="color: #c2c98f;">#{</span>prefix<span style="color: #c2c98f;">}</span><span style="color: #c2c98f;">"</span>
    system <span style="color: #c2c98f;">'</span><span style="color: #a2a96f;">make install</span><span style="color: #c2c98f;">'</span>
  <span style="color: #8a9597;">end</span>
<span style="color: #8a9597;">end</span></code></pre>
</div>
</div>
</li>
<li>
<div class="group row">
<div class="col-1">
<p>{{ page.pagecontent.complement }}</p>
</div>
</div>
</li>
<li>
<div class="group row">
<h2>{{ page.pagecontent.install.install }}</h2>
<pre style='clear:both;text-align:center;margin:0 -3em;margin-bottom:0.9em'><code id='selectable' onclick="selectText()">ruby -e &quot;$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)&quot;</code></pre>
<div class="col-1">
<p>{{ page.pagecontent.install.paste }}</p>
</div>
<div class="col-2">
<p>{{ page.pagecontent.install.what }}</p>
</div>
</div>
</li>
<li>
<div class="group row">
<h2>{{ page.pagecontent.doc.further }}</h2>
<div class="button">
<p><a href="https://github.com/mxcl/homebrew/wiki">{{ page.pagecontent.doc.wiki }}</a></p>
</div>
</div>
</li>
<li>
<div class="group row credits">
<p>{{ page.pagecontent.foot.code }} {{ page.pagecontent.foot.page }} {{ page.pagecontent.foot.translation }}</p>
</div>
</li>
</ul>
</div>
</div>
<a href="http://github.com/mxcl/homebrew"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub" /></a>
</body>
</html>
Copy path View file
@@ -1,151 +1,25 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Homebrew — MacPorts driving you to drink? Try Homebrew!</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="dc.creator" content="Rémi Prévost - http://exomel.com" />
<link rel="stylesheet" href="./css/screen.css" type="text/css" media="screen" />
<link rel="stylesheet" href="./css/fonts/chunkfive/chunkfive.css" type="text/css" media="screen" />
<script type="text/javascript">
function selectText() {
if (document.selection) {
var range = document.body.createTextRange();
range.moveToElementText(document.getElementById('selectable'));
range.select();
} else if (window.getSelection) {
var range = document.createRange();
range.selectNode(document.getElementById('selectable'));
window.getSelection().addRange(range);
}
}
</script>
</head>
<body>
<div id="wrap">
<div id="header">
<h1><a href="./">Homebrew</a></h1>
<p id="subtitle"><strong>The missing package manager for OS X</strong></p>
<p>English Version | <a href="index_fr-fr.html">Version Francaise</a> | <a href="index_zh-cn.html">简体中文版</a> | <a href="index_zh-tw.html">繁體中文版</a></p>
</div>
<div id="informations">
<ul>
<li>
<div class="group row">
<div class="col-1">
<p>Homebrew installs <a href="https://github.com/mxcl/homebrew/tree/master/Library/Formula" title="List of Homebrew packages">the stuff you need</a> that Apple didn’t.</p>
</div>
<div class="col-2">
<pre><code><span style="color: #e3d796;">$</span> brew install wget</code></pre>
</div>
</div>
</li>
<li>
<div class="group row">
<div class="col-1">
<p>Homebrew installs packages to their own directory and then symlinks their files into <code>/usr/local</code>.</p>
</div>
<div class="col-2">
<pre><code><span style="color: #e3d796;">$</span> cd /usr/local
<span style="color: #e3d796;">$</span> find Cellar
Cellar/wget/1.12
Cellar/wget/1.12/bin/wget
Cellar/wget/1.12/share/man/man1/wget.1
<span style="color: #e3d796;">$</span> ls -l bin
bin/wget -&gt; ../Cellar/wget/1.12/bin/wget</code></pre>
</div>
</div>
</li>
<li>
<div class="group row">
<div class="col-1">
<p>Homebrew won’t install files outside its prefix, and you can place a Homebrew installation wherever you like.</p>
</div>
</div>
</li>
<li>
<div class="group row">
<div class="col-1">
<p>Trivially create your own Homebrew packages.</p>
</div>
<div class="col-2">
<pre><code><span style="color: #e3d796;">$</span> brew create http://foo.com/bar-1.0.tgz
Created /usr/local/Library/Formula/bar.rb
</code></pre>
</div>
</div>
</li>
<li>
<div class="group row">
<div class="col-1">
<p>It's all git and ruby underneath, so hack away with the knowledge that you can easily revert your modifications and merge upstream updates.</p>
</div>
<div class="col-2">
<pre><code><span style="color: #e3d796;">$</span> brew edit wget <span style="color: #666;"># opens in $EDITOR!</span></code></pre>
</div>
</div>
</li>
<li>
<div class="group row">
<div class="col-1">
<p>Homebrew formula are simple Ruby scripts:</p>
</div>
<div class="col-2">
<pre class="overflow"><code><span style="color: #8a9597;">require</span> <span style="color: #c2c98f;">'</span><span style="color: #a2a96f;">formula</span><span style="color: #c2c98f;">'</span>
<span style="color: #8a9597;">class</span> <span style="color: #e3d796;"><em>Wget</em></span&lt; Formula
  homepage <span style="color: #c2c98f;">'</span><span style="color: #a2a96f;">http://www.gnu.org/wget/</span><span style="color: #c2c98f;">'</span>
  url <span style="color: #c2c98f;">'</span><span style="color: #a2a96f;">http://ftp.gnu.org/wget-1.12.tar.gz</span><span style="color: #c2c98f;">'</span>
  md5 <span style="color: #c2c98f;">'</span><span style="color: #a2a96f;">308a5476fc096a8a525d07279a6f6aa3</span><span style="color: #c2c98f;">'</span>
  <span style="color: #8a9597;">def</span> <span style="color: #a999ac;">install</span>
    system <span style="color: #c2c98f;">"</span><span style="color: #a2a96f;">./configure</span><span style="color: #c2c98f;"> </span><span style="color: #a2a96f;">--prefix=</span><span style="color: #c2c98f;">#{</span>prefix<span style="color: #c2c98f;">}</span><span style="color: #c2c98f;">"</span>
    system <span style="color: #c2c98f;">'</span><span style="color: #a2a96f;">make install</span><span style="color: #c2c98f;">'</span>
  <span style="color: #8a9597;">end</span>
<span style="color: #8a9597;">end</span></code></pre>
</div>
</div>
</li>
<li>
<div class="group row">
<div class="col-1">
<p>Homebrew complements OS X. Install your gems with <code>gem</code>, and their dependencies with <code>brew</code>.</p>
</div>
</div>
</li>
<li>
<div class="group row">
<h2>Install Homebrew</h2>
<pre style='clear:both;text-align:center;margin:0 -3em;margin-bottom:0.9em'><code id='selectable' onclick="selectText()">ruby -e &quot;$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)&quot;</code></pre>
<div class="col-1">
<p>Paste that at a Terminal prompt.</p>
</div>
<div class="col-2">
<p>The script explains what it will do and then pauses before it does it. There are more installation options <a href='https://github.com/mxcl/homebrew/wiki/Installation'>here</a> (needed on 10.5).
</div>
</div>
</li>
<li>
<div class="group row">
<h2>Further Documentation</h2>
<div class="button">
<p><a href="https://github.com/mxcl/homebrew/wiki">Homebrew Wiki</a></p>
</div>
</div>
</li>
<li>
<div class="group row credits">
<p>Original code by <a href="http://methylblue.com/">Max Howell</a>. Website by <a href="http://exomel.com">Rémi Prévost</a>.</p>
</div>
</li>
</ul>
</div>
</div>
<a href="http://github.com/mxcl/homebrew"><img style="position: absolute; top: 0; right: 0; border: 0;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub" /></a>
</body>
</html>
---
layout: index
lang: en
title: Homebrew — MacPorts driving you to drink? Try Homebrew!
subtitle: The missing package manager for OS X
pagecontent:
what: Homebrew installs <a href="https://github.com/mxcl/homebrew/tree/master/Library/Formula" title="List of Homebrew packages">the stuff you need</a> that Apple didn’t.
how: Homebrew installs packages to their own directory and then symlinks their files into <code>/usr/local</code>.
prefix: Homebrew won’t install files outside its prefix, and you can place a Homebrew installation wherever you like.
createpackages: Trivially create your own Homebrew packages.
hack: It's all git and ruby underneath, so hack away with the knowledge that you can easily revert your modifications and merge upstream updates.
formula: "Homebrew formula are simple Ruby scripts:"
complement: Homebrew complements OS X. Install your gems with <code>gem</code>, and their dependencies with <code>brew</code>.
install:
install: Install Homebrew
paste: Paste that at a Terminal prompt.
what: The script explains what it will do and then pauses before it does it. There are more installation options <a href='https://github.com/mxcl/homebrew/wiki/Installation'>here</a> (needed on 10.5).
doc:
further: Further Documentation
wiki: Homebrew Wiki
foot:
code: Original code by <a href="http://methylblue.com/">Max Howell</a>.
page: Website by <a href="http://exomel.com">Rémi Prévost</a>.
---
Oops, something went wrong.
ProTip! Use n and p to navigate between commits in a pull request.