Skip to content

Commit

Permalink
Merge pull request #74 from davidzchen/site
Browse files Browse the repository at this point in the history
Convert site to Jekyll.
  • Loading branch information
davidzchen committed Dec 16, 2015
2 parents 42ed2d5 + 65e4269 commit ff50536
Show file tree
Hide file tree
Showing 93 changed files with 112,185 additions and 9,308 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ALL = \
libjsonnet_test_snippet \
libjsonnet_test_file \
libjsonnet.js \
doc/libjsonnet.js \
doc/js/libjsonnet.js \
$(LIB_OBJ)
ALL_HEADERS = \
core/ast.h \
Expand Down Expand Up @@ -113,7 +113,7 @@ libjsonnet.js: $(LIB_SRC) $(ALL_HEADERS)
$(EMCXX) -s $(JS_EXPORTED_FUNCTIONS) $(EMCXXFLAGS) $(LDFLAGS) $(LIB_SRC) -o $@

# Copy javascript build to doc directory
doc/libjsonnet.js: libjsonnet.js
doc/js/libjsonnet.js: libjsonnet.js
$(CP) $^ $@

# Tests for C binding.
Expand Down
11 changes: 11 additions & 0 deletions benchmarks/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package(default_visibility = ["//visibility:public"])

load("/tools/build_defs/jsonnet_dev/jsonnet_docs", "jsonnet_docs_srcs_zip")

jsonnet_docs_srcs_zip(
name = "jsonnet_docs_srcs",
srcs = [
"bench.02.jsonnet",
"bench.03.jsonnet",
],
)
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
production
36 changes: 36 additions & 0 deletions doc/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package(default_visibility = ["//visibility:public"])

filegroup(
name = "jekyll_files",
srcs = glob(
["**/*"],
exclude = [
"BUILD",
"production/**/*", # Exclude Jekyll output.
"*.swp", # Exclude vim temp files.
],
),
)

genrule(
name = "jekyll_files_zip",
srcs = [":jekyll_files"],
outs = ["jekyll_files.zip"],
cmd = "zip -qR $@ $(locations :jekyll_files)"
)

genrule(
name = "jekyll_tree",
srcs = [
":jekyll_files_zip",
"//examples:jsonnet_docs_srcs",
"//benchmarks:jsonnet_docs_srcs",
],
outs = ["jekyll_tree.zip"],
cmd = ("$(location //tools/build_defs/jsonnet_dev:build_jekyll_tree)" +
" $(location :jekyll_files_zip)" +
" $(location //examples:jsonnet_docs_srcs)" +
" $(location //benchmarks:jsonnet_docs_srcs)" +
" $(location jekyll_tree.zip)"),
tools = ["//tools/build_defs/jsonnet_dev:build_jekyll_tree"],
)
1 change: 1 addition & 0 deletions doc/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jsonnet.org
29 changes: 0 additions & 29 deletions doc/Makefile

This file was deleted.

4 changes: 4 additions & 0 deletions doc/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
destination: production
markdown: redcarpet
paginate: 10
highlighter: pygments
7 changes: 7 additions & 0 deletions doc/_includes/domain-redirect.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script>
var current_url = window.location.href;
var bad_url = new RegExp("^https?://google.github.io/jsonnet/");
if (bad_url.test(current_url)) {
window.location.replace(current_url.replace(bad_url, "http://jsonnet.org/"));
}
</script>
43 changes: 43 additions & 0 deletions doc/_includes/nav.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<ol id="menubar">

<li id="menu_userdocs">
<a href="/docs/index.html" onmouseover="menu_open(this)" onmouseout="menu_leave()">User docs</a>
<div onmouseover="menu_open(this)" onmouseout="menu_leave()">
<a href="/docs/tutorial.html">Tutorial</a>
<a href="/docs/demo.html">Demo</a>
<a href="/docs/stdlib.html">Standard Library</a>
</div>
</li>

<li id="menu_casestudies">
<a href="/case_studies/index.html" onmouseover="menu_open(this)" onmouseout="menu_leave()">Case Studies</a>
<div onmouseover="menu_open(this)" onmouseout="menu_leave()">
<a href="/case_studies/casestudy_fractal.1.html">Fractal</a>
</div>
</li>

<li id="menu_language">
<a href="/language/index.html" onmouseover="menu_open(this)" onmouseout="menu_leave()">Language</a>
<div onmouseover="menu_open(this)" onmouseout="menu_leave()">
<a href="/language/design.html">Design</a>
<a href="/language/comparisons.html">Comparisons</a>
<a href="/language/spec.html">Specification</a>
</div>
</li>

<li id="menu_implementation">
<a href="/implementation/index.html" onmouseover="menu_open(this)" onmouseout="menu_leave()">Implementation</a>
<div onmouseover="menu_open(this)" onmouseout="menu_leave()">
<a href="/implementation/commandline.html">Cmdline Tool</a>
<a href="/implementation/bindings.html">Libraries</a>
<a href="/implementation/cpp.html">C++ Internals</a>
<a href="/implementation/javascript.html">Javascript</a>
<a href="/implementation/tests.html">Tests</a>
</div>
</li>

<li id="menu_contributing">
<a href="/contributing.html" onmouseover="menu_open(this)" onmouseout="menu_leave()">Contributing</a>
</li>

</ol>
71 changes: 21 additions & 50 deletions doc/header.html.jinja → doc/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
<meta name="keywords" content="Jsonnet, JSON, YAML, language, configuration, configuration language, functional, declarative, lazy, structured, elegant, semantics, clean, mixins, inheritance, template, expansion, expand" />
<meta name="description" content="The Jsonnet language allows elegant and easy description of JSON data." />

<link rel="icon" type="image/png" href="favicon.png" />
<link rel="icon" type="image/png" href="/favicon.png" />

<link rel="stylesheet" href="prism.css" />
<link rel="stylesheet" type="text/css" href="doc.css" />
<link rel="stylesheet" href="/css/prism.css" />
<link rel="stylesheet" type="text/css" href="/css/doc.css" />

{% include domain-redirect.html %}

<script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
Expand All @@ -26,7 +28,7 @@

</script>

<script src="prism.js" type="text/javascript">
<script src="/js/prism.js" type="text/javascript">
</script>

<script type="text/javascript">
Expand Down Expand Up @@ -124,7 +126,7 @@
}
}

document.onclick = menu_close_all();
document.onclick = menu_close_all();

</script>

Expand All @@ -139,52 +141,21 @@
<a href="https://groups.google.com/forum/#!forum/jsonnet"><div id="groupsmark"></div></a>
<a href="http://github.com/google/jsonnet"><div id="githubmark"></div></a>
</div>
<div class="title"><a href="index.html" class="title">Jsonnet</a></div>

<ol id="menubar">

<li id="menu_userdocs">
<a href="userdocs.html" onmouseover="menu_open(this)" onmouseout="menu_leave()">User docs</a>
<div onmouseover="menu_open(this)" onmouseout="menu_leave()">
<a href="tutorial.html">Tutorial</a>
<a href="demo.html">Demo</a>
<a href="stdlib.html">Standard Library</a>
</div>
</li>

<li id="menu_casestudies">
<a href="casestudies.html" onmouseover="menu_open(this)" onmouseout="menu_leave()">Case Studies</a>
<div onmouseover="menu_open(this)" onmouseout="menu_leave()">
<a href="casestudy_fractal.1.html">Fractal</a>
</div>
</li>

<li id="menu_language">
<a href="language.html" onmouseover="menu_open(this)" onmouseout="menu_leave()">Language</a>
<div onmouseover="menu_open(this)" onmouseout="menu_leave()">
<a href="design.html">Design</a>
<a href="comparisons.html">Comparisons</a>
<a href="spec.html">Specification</a>
</div>
</li>

<li id="menu_implementation">
<a href="implementation.html" onmouseover="menu_open(this)" onmouseout="menu_leave()">Implementation</a>
<div onmouseover="menu_open(this)" onmouseout="menu_leave()">
<a href="commandline.html">Cmdline Tool</a>
<a href="bindings.html">Libraries</a>
<a href="cpp.html">C++ Internals</a>
<a href="javascript.html">Javascript</a>
<a href="tests.html">Tests</a>
</div>
</li>

<li id="menu_contributing">
<a href="contributing.html" onmouseover="menu_open(this)" onmouseout="menu_leave()">Contributing</a>
</li>

</ol>
<div class="title"><a href="/index.html" class="title">Jsonnet</a></div>

{% include nav.html %}

<div style="clear: both"></div>

</div>

{{ content }}

<div style="margin-bottom: 50px"></div>
<hr />
<p class="copyright">
Except as noted, this content is licensed under Creative Commons Attribution 2.5.
</p>
</body>

</html>
8 changes: 8 additions & 0 deletions doc/_layouts/redirect.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
{% include domain-redirect.html %}
<script>
window.location.replace("{{ page.redirect }}");
</script>
</head>
</html>
Loading

0 comments on commit ff50536

Please sign in to comment.