blob: 4c13db69e52d58b7a94fdf9512df0c7265232c9c [file] [log] [blame]
Ian Maxonf84cb812015-12-07 15:09:45 -08001<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <meta http-equiv="X-UA-Compatible" content="IE=edge">
6 <meta name="viewport" content="width=device-width, initial-scale=1">
7 <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
8 <meta name="description" content="">
9 <meta name="author" content="">
10 <link rel="icon" href="favicon.ico">
11
12 <title>Editing this website</title>
13
14 <!-- Bootstrap core CSS -->
15 <link href="css/bootstrap.min.css" rel="stylesheet">
16 <!-- Bootstrap theme -->
17
18 <!-- Custom styles for this template -->
19 <link href="css/theme.css" rel="stylesheet">
20
21 <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
22 <!--[if lt IE 9]>
23 <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
24 <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
25 <![endif]-->
26 <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
27 </head>
28
29 <div class="container theme-showcase" role="main">
30 <div class="masthead">
31 <p class="lead">
32 <a href="index.html"><img src="img/asterixdb.png" style="height:75px; width:auto; vertical-align:bottom; margin-top:10px;"/></a>
33 </p>
34</div>
35
36<nav class="navbar navbar-default">
37 <div class="container">
38 <div class="navbar-header">
39 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
40 <span class="sr-only">Toggle navigation</span>
41 <span class="icon-bar"></span>
42 <span class="icon-bar"></span>
43 <span class="icon-bar"></span>
44 </button>
45 <a class="navbar-brand" href="index.html">Overview</a>
46 </div>
47 <div class="navbar-collapse collapse">
48 <ul class="nav navbar-nav">
49 <li><a href="download.html">Download</a></li>
50 <li class="dropdown">
51 <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Documentation<span class="caret"></span></a>
52 <ul class="dropdown-menu" role="menu">
53 <li class="dropdown-header">Stable release</li>
Till Westmanne617e522016-02-29 12:42:51 -080054 <li><a href="docs/0.8.8-incubating/index.html">Documentation for 0.8.8-incubating<i class="fa fa-external-link fa-sm"></i></a></li>
Ian Maxonf84cb812015-12-07 15:09:45 -080055 <li class="divider"></li>
56 <li class="dropdown-header">Snapshot release</li>
57 <li><a href="https://ci.apache.org/projects/asterixdb/index.html">Documentation for 0.8.8-SNAPSHOT <i class="fa fa-external-link fa-sm"></i></a></li>
58 </ul>
59 </li>
60 <li><a href="about.html">About</a></li>
61 <li><a href="community.html">Community</a></li>
62 <li class="dropdown">
63 <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Contributing <span class="caret"></span></a>
64 <ul class="dropdown-menu" role="menu">
65 <li class="dropdown-header">For New Contributors</li>
66 <li><a href="dev-setup.html">Development Setup</a></li>
67 <li class="divider"></li>
68 <li class="dropdown-header">For Committers</li>
69 <li><a href="pushing.html">Pushing changes</a></li>
70 <li><a href="site.html">Editing this site</a></li>
71 </ul>
72 </li>
73 </ul>
74 </div><!--/.nav-collapse -->
75 </div>
76 </nav>
77
78
79 <div class="row">
80<div class="col-md-8 col-centered">
81<h2>Editing this website</h2>
82<!-- Major credit to the Apache Flink guys for writing a great doc in a similar vein for their website
83that happens to use more or less the same tooling as AsterixDB's. Much of this doc is based on it. -->
84
85<ul id="markdown-toc">
86 <li><a href="#prerequisites" id="markdown-toc-prerequisites">Prerequisites</a> <ul>
87 <li><a href="#jekyll" id="markdown-toc-jekyll">Jekyll.</a></li>
88 <li><a href="#checking-out-the-website-sources" id="markdown-toc-checking-out-the-website-sources">Checking out the website sources</a></li>
89 </ul>
90 </li>
91 <li><a href="#making-a-change-to-the-site" id="markdown-toc-making-a-change-to-the-site">Making a change to the site</a> <ul>
92 <li><a href="#editing-and-viewing-the-change" id="markdown-toc-editing-and-viewing-the-change">Editing and viewing the change.</a></li>
93 <li><a href="#submitting-the-change-to-the-live-site" id="markdown-toc-submitting-the-change-to-the-live-site">Submitting the change to the live site</a></li>
94 </ul>
95 </li>
96</ul>
97
98<hr />
99
100<h2 id="prerequisites">Prerequisites</h2>
101
102<h3 id="jekyll">Jekyll.</h3>
103<p>This website is written using a static website generator called <a href="https://github.com/jekyll/jekyll">Jekyll</a>. To work with editing this website you will need to install it.
104In short, Jekyll uses a combination of templated HTML files and Markdown to compile the final site.
105Generally, the content itself lies within the Markdown files, and the HTML is for layout.
106A full tutorial about how to use Jekyll is out of the scope of this document, but, for our purposes, only Markdown will be edited.</p>
107
108<h3 id="checking-out-the-website-sources">Checking out the website sources</h3>
109
110<p>The website is managed using <code>git</code>. Clone the site as usual</p>
111
Till Westmann1dba8882016-02-29 15:44:42 -0800112<pre><code> ➤ git clone -b asf-site https://git-wip-us.apache.org/repos/asf/incubator-asterixdb-site.git
113</code></pre>
114
115<p>and <code>cd</code> into the clone</p>
116
117<pre><code> ➤ cd incubator-asterixdb-site
Ian Maxonf84cb812015-12-07 15:09:45 -0800118</code></pre>
119
120<p>You will notice lots of Markdown files and HTML templates in the repository root. The compiled content of the website itself is served from the <code>content/</code> folder in this repository. That is to say, that the actual content of the website itself, as well as its sources are stored in the same repository. Additionally, the main branch on this repository is <code>asf-site</code> and not <code>master</code></p>
121
122<p>Gerrit is used to submit code reviews for the website just as it is with the main codebase. The main difference the site is not strictly subject to code reviews.</p>
123
Till Westmann1dba8882016-02-29 15:44:42 -0800124<p>Then, you likely will want to check out to make your own topic branch as to not work directly on the “live” branch, like so:</p>
Ian Maxonf84cb812015-12-07 15:09:45 -0800125
Till Westmann1dba8882016-02-29 15:44:42 -0800126<pre><code> ➤ git checkout -b YOU/site
127</code></pre>
128
129<p>And perform the git-gerrit init on this branch</p>
130
131<pre><code> ➤ git gerrit init -u ssh://YOU@asterix-gerrit.ics.uci.edu:29418/ -p incubator-asterixdb-site
Ian Maxonf84cb812015-12-07 15:09:45 -0800132</code></pre>
133
134<h2 id="making-a-change-to-the-site">Making a change to the site</h2>
135
Till Westmann1dba8882016-02-29 15:44:42 -0800136<p>The general overview is as follows:</p>
137
138<ul>
139 <li>Make edits and check the output of <code>jekyll build</code></li>
140 <li>Commit the change and propose it for review</li>
141 <li>Either wait for a review, or submit the change</li>
142</ul>
Ian Maxonf84cb812015-12-07 15:09:45 -0800143
144<h3 id="editing-and-viewing-the-change">Editing and viewing the change.</h3>
145
146<p>For whichever section of the site you want to edit, go ahead and do so with the text editor of your choice. Then, to see what your change looks like, in the repository root, execute:</p>
147
148<pre><code> ➤ jekyll serve --watch
149</code></pre>
150
151<p>This sets up a small integrated web server and compiles the site dynamically as it is edited. Once you are satisfied with how the site looks, go ahead and commit your changes with git.</p>
152
Ian Maxonf84cb812015-12-07 15:09:45 -0800153<p>Once you have made your commit, push it to Gerrit for review:</p>
154
Till Westmann1dba8882016-02-29 15:44:42 -0800155<pre><code> ➤ git gerrit submit -b asf-site
Ian Maxonf84cb812015-12-07 15:09:45 -0800156</code></pre>
157
Till Westmann1dba8882016-02-29 15:44:42 -0800158<p>For longer edits you might need to update your local <code>asf-site</code> mirror, and then merge that onto your working branch. This will prevent your branch from falling too far out of date, and ensure that your code review proposals will merge successfully with <code>master</code>. Similar to the way this is done for code changes you can use</p>
159
160<pre><code> ➤ git gerrit update -b asf-site
161</code></pre>
162
163<p>to do this.</p>
Ian Maxonf84cb812015-12-07 15:09:45 -0800164
165<h3 id="submitting-the-change-to-the-live-site">Submitting the change to the live site</h3>
166
167<p>When the submitted review is committed in Gerrit, pull it and overwrite your current asf-site branch:</p>
168
Till Westmann1dba8882016-02-29 15:44:42 -0800169<pre><code> ➤ git fetch gerrit
Ian Maxonf84cb812015-12-07 15:09:45 -0800170</code></pre>
171
172<p>Then, push the exact commit from the Gerrit web interface to the ASF git repository. Do this with care! ASF git doesn’t allow hard resets on branches, so whatever you push here is final.</p>
173
Till Westmann1dba8882016-02-29 15:44:42 -0800174<pre><code> ➤ git push origin (SHA1 of submitted commit):asf-site
Ian Maxonf84cb812015-12-07 15:09:45 -0800175</code></pre>
176
177
178</div>
179</div>
180
181
182 <hr />
183
184 <footer>
185 <div class="row">
186 <div class="col-md-6 col-md-offset-3 text-center">
Till Westmann237a2642016-02-25 16:14:40 -0800187 <p>&copy; Copyright 2016 The Apache Software foundation. All Rights Reserved. </p>
Ian Maxonf84cb812015-12-07 15:09:45 -0800188 <p>Apache AsterixDB, Apache, and the Apache feather logo are trademarks of the Apache Software Foundation</p>
189 </div>
190 <div class="col-md-1 text-right">
191 <img src="img/egg-logo.png" style="height:auto; width:200px; vertical-align:bottom;"/>
192 </div>
193 </div>
194 </footer>
195 </div> <!-- /container -->
196
197
198 <!-- Bootstrap core JavaScript
199 ================================================== -->
200 <!-- Placed at the end of the document so the pages load faster -->
201 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
202 <script src="js/bootstrap.min.js"></script>
203 </body>
204</html>