Add tutorials to sitemap & prerender

This commit is contained in:
Andrew Miner
2015-03-20 14:12:56 -07:00
parent b34d6ef483
commit dc68615bb3
3 changed files with 114 additions and 0 deletions
+7
View File
@@ -16,6 +16,7 @@ fs = require 'fs'
modSlugs = {}
itemSlugs = {}
tutorialSlugs = []
base = 'http://crafting-guide.com'
@@ -41,9 +42,15 @@ for modSlug, modData of DefaultMods
modVersion.eachItem (item)->
itemSlugs[item.slug] = item.slug
for tutorial in mod.tutorials
tutorialSlugs.push mod:mod.slug, tutorial:tutorial.slug
for modSlug in _.values(modSlugs).sort()
urls.push base + "/browse/#{modSlug}/"
for tutorialSlug in tutorialSlugs
urls.push base + "/browse/#{tutorialSlug.mod}/tutorials/#{tutorialSlug.tutorial}/"
for key in _.keys(itemSlugs).sort()
itemSlug = itemSlugs[key]
urls.push base + "/browse/#{itemSlug.mod}/#{itemSlug.item}/"
@@ -0,0 +1,106 @@
<!DOCTYPE html><html><head>
<title>The Ultimate Minecraft Crafting Guide</title>
<meta charset="UTF-8">
<link href="/images/favicon.png" rel="icon" type="image/png">
<link rel="stylesheet" type="text/css" href="/css/main.css">
<link rel="stylesheet" type="text/css" href="/css/jquery-ui.css">
</head>
<body>
<div class="view__feedback" style="left: -250px; "><input name="name" placeholder="name (optional)"><input name="email" placeholder="email (optional)"><label name="comment">Comment:</label><textarea name="comment"></textarea><button name="send" disabled="disabled">send</button><div class="error"><p>Sending failed. Please try again later.</p></div><div class="label"><img src="/images/paper.png"><p>Feedback</p></div></div>
<div class="view__screen"></div>
<div class="content">
<div class="view__header">
<h1><a href="/" class="logo"><img src="/images/workbench_front.png"></a>
<p>Crafting Guide for Minecraft</p>
</h1>
<div class="addthis_sharing_toolbox"></div>
<div class="divider bottom"></div>
<div class="navBar"><a data-page="home" href="/" style="z-index: 104; ">
<p>Home</p>
<div class="dot" style="opacity: 0; "></div></a><a data-page="configure" href="/configure/" style="z-index: 103; ">
<p>Configure</p>
<div class="dot" style="opacity: 0; "></div></a><a data-page="browse" href="/browse/" style="z-index: 102; ">
<p>Browse</p>
<div class="dot" style="opacity: 1; "></div></a><a data-page="craft" href="/craft/" style="z-index: 101; ">
<p>Craft</p>
<div class="dot" style="opacity: 0; "></div></a></div>
</div>
<div class="view__tutorial_page page" style=""><div class="sidebar"><div class="titleImage"><a><img src="/browse/buildcraft/tutorials/gates_wires_and_chips/icon.png"></a></div><a target="new" class="officialPage externalLink hidden"><p>Offical Documentation</p></a><div class="view__adsense placeholder sidebar_skyscraper"></div></div><div class="mainBody"><h1 class="name">Gates, Wires, and Chips</h1><div class="byline"><p>from <a href="/browse/buildcraft/">Buildcraft</a></p></div><div class="sections"><div class="view__markdown_section section"><h2>What do gates do?</h2><div class="panel markdown"><p>BuildCraft gates are devices which can be attached to a pipe to detect and interact with objects nearby. Gates
can read a wide variety of conditions: that a nearby chest is full, or that a <a href="/browse/buildcraft/combustion_engine">Combustion
Engine</a> is about to overheat. In reaction to these conditions, gates can
emit various kinds of signals (including redstone signals) to control other gates and/or machines.</p></div></div><div class="view__markdown_section section"><h2>An Example: Controlling Engines</h2><div class="panel markdown"><p>Before diving into all the details, let's look at a realistic example of what you might do with gates. This is a
small power plant driving a quarry.</p>
<p><img alt="" src="./example_1_overview.png"></p>
<p>Here are the important pieces of the build:</p>
<ol><li>The on/off switch for the entire operation. Flipping the switch creates a redstone signal.</li><li>A <a href="/browse/buildcraft/basic_gate/">Basic Gate</a> attached to a <a href="/browse/buildcraft/structure_pipe">Structure Pipe</a> reads the redstone signal and generates a red pipe wire signal.</li><li><a href="/browse/buildcraft/red_pipe_wire">Red Pipe Wire</a> follows the <a href="/browse/buildcraft/cobblestone_kinesis_pipe">Cobblestone Kinesis Pipe</a>, transmitting the signal throughout the rest of the build.</li><li>Another Basic Gate receives the red pipe wire signal and converts it back to a redstone signal, thus turning
the <a href="/browse/buildcraft/combustion_engine">Combustion Engine</a>s on.</li><li>The red pipe wire signal is also received by Basic Gates next to the [Redstone
Engine(/browse/buildcraft/redstone_engine)s, turning them on as well, and causing both fuel and water to
flow into the engines.</li><li>Finally, the power generated by the Combusion Engines flows into the <a href="/browse/buildcraft/quarry/">Quarry</a>.</li></ol></div></div></div><div class="videos section" style="display: block; "><h2>Video</h2><div class="panel"><div class="view__video"><iframe width="365" height="273" src="http://www.youtube.com/embed/J6-VUApZGQs?modestbranding=1&amp;autohide=1&amp;showinfo=0" frameborder="0" allowfullscreen="true"></iframe><div class="caption"><p>Buildcraft Gates Tutorial, Part 1</p></div></div></div></div></div></div>
<div class="view__footer">
<div class="divider top"></div>
<div class="left">
<h2>
<p>About</p>
</h2>
<p>
Crafting Guide gives step-by-step tutorials for making anything in Minecraft or its many mods. Just say what
you'd like to make, what you already have, it will do the rest, giving you a list of raw materials you need
to collect and step-by-step instructions of how much to make of which items in the proper order. You can
even ask it to include the materials and instructions for all the tools you'll need along the way!
</p>
</div>
<div class="center">
<h2>
<p>Donate</p>
</h2>
<p>Crafting Guide is free for all, but if you find it helpful, donations in any amount are gratefully accepted.</p>
<div class="action">
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top" class="centered">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="GCB2TYZJYLAE6">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"><img src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</div>
</div>
<div class="right">
<h2>
<p>Get Involved</p>
</h2>
<p>
Crafting Guide is completely open-source, and you can help! Whether you want to write a recipe book (all
simple JSON), or implement new features, just head over to GitHub to get started.
</p>
<div class="action">
<iframe src="http://ghbtns.com/github-btn.html?user=andrewminer&amp;repo=crafting-guide&amp;type=fork&amp;size=large" allowtransparency="true" frameborder="0" scrolling="0" width="100" height="32"></iframe>
</div>
</div><a href="/test.html" rel="nofollow">
<div class="divider bottom"></div></a>
</div>
</div>
<script src="/js/underscore.js"></script>
<script src="/js/jquery.js"></script>
<script src="/js/backbone.js"></script>
<script src="/js/jade.js"></script>
<script src="/js/markdown.js"></script>
<script src="/js/when.js"></script>
<script src="/js/jquery-ui.js"></script>
<script src="/js/main.js"></script>
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
if (window.location.hostname === 'crafting-guide.com') {
(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),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-54970416-2', 'crafting-guide.com');
ga('require', 'displayfeatures');
ga('require', 'linkid', 'linkid.js');
}
</script>
</body></html>
+1
View File
@@ -12,6 +12,7 @@ http://crafting-guide.com/browse/industrial_craft_2/
http://crafting-guide.com/browse/minecraft/
http://crafting-guide.com/browse/railcraft/
http://crafting-guide.com/browse/thermal_expansion/
http://crafting-guide.com/browse/buildcraft/tutorials/gates_wires_and_chips/
http://crafting-guide.com/browse/applied_energistics_2/128_spatial_component/
http://crafting-guide.com/browse/applied_energistics_2/128_spatial_storage_cell/
http://crafting-guide.com/browse/applied_energistics_2/16_spatial_component/