Browse Source

cleanup for PR and add more code documentation

beginners-guide
Bucko 7 years ago
parent
commit
d2b8b355fb
  1. 21
      guide-generator.js
  2. 484
      guides-old.html
  3. 405
      guides/test.html
  4. 11
      utils/createHTML.js
  5. 14
      utils/generateArchive.js
  6. 6
      utils/generatePages.js
  7. 12
      utils/helpers.js

21
guide-generator.js

@ -41,13 +41,14 @@ if ( args.indexOf('--help') > -1 || args.length === 0 ) {
}
generatePages(markdownDir, all, __dirname)
.then(() => {
console.log('Writing guides archive...');
return generateArchive('guides', __dirname);
})
.then((guidesArchive) => {
fs.writeFileSync('guides.html', guidesArchive);
console.log('Guides archive done');
})
.then(() => console.log('All files done!'))
.catch(e => console.log('There was a problem: ', e));
.then((files) => {
console.log('Finished generating files: ', files);
console.log('Writing guides archive...');
return generateArchive('guides', __dirname);
})
.then((guidesArchive) => {
fs.writeFileSync('guides.html', guidesArchive);
console.log('Guides archive done');
})
.then(() => console.log('All files done!'))
.catch(e => console.log('There was a problem: ', e));

484
guides-old.html

@ -1,484 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>bcoin | Extending Bitcoin into Enterprise & Production</title>
<!-- Favicons -->
<!-- old
<link rel="shortcut icon" href="assets/images/bcoin-ico.png">-->
<!-- generated from http://www.favicon-generator.org/ -->
<link rel="apple-touch-icon" sizes="57x57" href="assets/images/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="assets/images/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="assets/images/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="assets/images/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="assets/images/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="assets/images/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="assets/images/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="assets/images/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="assets/images/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="assets/images/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="assets/images/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/images/favicon-16x16.png">
<link rel="manifest" href="assets/images/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="assets/images/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- Web Fonts -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400italic,400,600,700' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Montserrat:700' rel='stylesheet' type='text/css'>
<!-- Bootstrap core CSS -->
<link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Icon Fonts -->
<link href="assets/css/font-awesome.min.css" rel="stylesheet">
<link href="assets/css/simple-line-icons.css" rel="stylesheet">
<!-- Plugins -->
<link href="assets/css/magnific-popup.css" rel="stylesheet">
<link href="assets/css/owl.carousel.css" rel="stylesheet">
<link href="assets/css/flexslider.css" rel="stylesheet">
<link href="assets/css/animate.min.css" rel="stylesheet">
<!-- Template core CSS -->
<link href="assets/css/vertical.min.css" rel="stylesheet">
<link href="assets/css/template.css" rel="stylesheet">
<!-- Google Analytics Tracking -->
<script>
(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','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-96446060-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<!-- PRELOADER -->
<div class="page-loader">
<div class="img-loader">Loading...
<!-- Bcoin logo in SVG -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 200 56" style="enable-background:new 0 0 200 56;" xml:space="preserve">
<g id="XMLID_108_">
<g id="XMLID_123_">
<path id="XMLID_124_" d="M8.4,51.8H3.2V4.2h5.2v19.2h0.8c1.2-2,2.8-3.6,4.8-4.7c2-1.1,4.3-1.6,6.7-1.6c2,0,4,0.4,5.8,1.2
c1.8,0.8,3.4,1.9,4.8,3.3c1.4,1.5,2.5,3.2,3.3,5.4s1.2,4.6,1.2,7.3v1.4c0,2.8-0.4,5.2-1.2,7.4c-0.8,2.1-1.9,3.9-3.3,5.4
c-1.4,1.5-3,2.6-4.9,3.3s-3.8,1.1-5.9,1.1c-1.1,0-2.2-0.1-3.3-0.4c-1.1-0.3-2.2-0.6-3.2-1.2c-1-0.5-1.9-1.2-2.8-1.9
c-0.8-0.7-1.6-1.6-2.1-2.7H8.4V51.8z M19.4,47.7c1.6,0,3.1-0.3,4.4-0.9c1.3-0.6,2.5-1.4,3.5-2.4c1-1,1.8-2.3,2.3-3.8
c0.6-1.5,0.8-3.2,0.8-5v-1.4c0-1.8-0.3-3.5-0.8-4.9c-0.6-1.5-1.3-2.7-2.3-3.8c-1-1.1-2.2-1.9-3.5-2.5c-1.4-0.6-2.8-0.9-4.4-0.9
c-1.6,0-3,0.3-4.3,0.9c-1.3,0.6-2.5,1.5-3.5,2.6c-1,1.1-1.8,2.4-2.4,3.9c-0.6,1.5-0.9,3.2-0.9,5v0.8c0,1.9,0.3,3.6,0.9,5.1
c0.6,1.5,1.4,2.8,2.4,3.9s2.2,1.9,3.5,2.5C16.4,47.4,17.9,47.7,19.4,47.7z"/>
</g>
<g id="XMLID_120_">
<path id="XMLID_121_" d="M76.1,39.8c-0.4,1.9-1,3.6-1.8,5.2c-0.9,1.6-2,3-3.3,4.1s-2.9,2.1-4.7,2.7c-1.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-- END PRELOADER -->
<!-- HEADER -->
<header class="header js-stick">
<div class="container">
<!-- YOUR LOGO HERE -->
<div class="inner-header">
<a class="inner-brand" href="index.html">
<img class="brand-light" src="assets/images/logo-light.png" width="100" alt="">
<img class="brand-dark" src="assets/images/logo-dark.png" width="100" alt="">
</a>
</div>
<!-- OPEN MOBILE MENU -->
<div class="main-nav-toggle">
<div class="nav-icon-toggle" data-toggle="collapse" data-target="#custom-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</div>
</div>
<!-- WIDGETS MENU -->
<div class="inner-header pull-right hide-me">
<div class="menu-extras clearfix">
<!-- SLACK LINK -->
<div class="menu-item">
<div class="">
<a href="slack-signup.html" target="_blank" id="" data-toggle="tooltip" title="" data-placement="bottom" data-original-title="Join us on Slack!">
<img src="assets/images/slack_icon.svg" width="18" height="18"/>
<span class=""></span>
</a>
</div>
</div>
<!-- STACK EXCHANGE LINK -->
<div class="menu-item">
<div class="">
<a href="https://bitcoin.stackexchange.com/questions/tagged/bcoin" target="_blank" id="" data-toggle="tooltip" title="" data-placement="bottom" data-original-title="Questions! Checkout Stack Exchange.">
<img src="assets/images/stack-exchange-icon.svg" width="18" height="18"/>
<span class=""></span>
</a>
</div>
</div>
<!-- GITHUB STUFF -->
<div class="menu-item">
<div class="">
<a href="https://github.com/bcoin-org/bcoin" target="_blank" id="" data-toggle="tooltip" title="" data-placement="bottom" data-original-title="Visit bcoin on GitHub to see the code!">
<img src="assets/images/github_icon.svg" width="18" height="18"/>
<span class=""></span>
</a>
</div>
</div>
<div class="menu-item">
<div class="ghbuttons">
<a class="github-button" href="https://github.com/bcoin-org/bcoin" data-icon="octicon-star" data-count-href="/bcoin-org/bcoin/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star bcoin-org/bcoin on GitHub">Star</a>
<a class="github-button" href="https://github.com/bcoin-org/bcoin/fork" data-icon="octicon-repo-forked" data-count-href="/bcoin-org/bcoin/network" data-show-count="true" data-count-aria-label="# forks on GitHub" aria-label="Fork bcoin-org/bcoin on GitHub">Fork</a>
</div>
</div>
</div>
</div>
<!-- MAIN MENU -->
<nav id="custom-collapse" class="main-nav collapse clearfix">
<ul class="inner-nav pull-right">
<!-- HOME -->
<li><a href="./index.html">Home</a></li>
<!-- END HOME -->
<!-- FEATURES -->
<li><a href="./index.html#features">What is Bcoin</a></li>
<!-- END FEATURES -->
<!-- GUIDES -->
<li><a href="guides.html">Guides</a></li>
<!-- GUIDES -->
<!-- API REFERENCE - newer, how to interact once you're setup -->
<li><a href="./api-docs/index.html">API Docs</a></li>
<!-- END API -->
<!-- FULL DOCS - older, full reference
<li><a href="http://bcoin.io/docs/index.html">Docs</a></li>-->
<!-- END DOCS -->
<!-- DIVIDER
<li><a>&nbsp;</a></li>
<li><a href="#">All Demos</a></li>-->
</ul>
</nav>
</div>
</header>
<!-- END HEADER -->
<!-- WRAPPER -->
<div class="wrapper">
<!-- PAGE TITLE -->
<section class="module-sm bg-white-dark" data-background="assets/images/bg-header.jpg">
<div class="container">
<div class="row">
<div class="col-sm-12 text-center">
<h2 class="montserrat text-uppercase m-b-10"><span class="text-highlight-black" style="line-height: 1.5;">&nbsp;Guides &nbsp;and &nbsp;Videos&nbsp;</span></h2>
</div>
</div>
</div>
</section>
<!-- END PAGE TITLE -->
<!-- GUIDES/TUTORIALS -->
<section class="module" style="padding-top:70px !important;">
<div class="container">
<div class="row">
<!-- SIDEBAR -->
<div class="col-sm-3 sidebar">
<!-- CATEGORIES WIDGET -->
<div class="widget guide-list">
<h6 class="montserrat text-uppercase bottom-line">Install</h6>
<ul class="icons-list">
<li><a href="guides/install-linux.html">Install on Linux</a></li>
<li><a href="guides/install-mac.html">Install on Mac OS</a></li>
<li><a href="guides/install-windows.html">Install on Windows</a></li>
<!--<li><a data-toggle="" href="">Quick Sync (Torrent) </a></li>-->
</ul>
<br>
<h6 class="montserrat text-uppercase bottom-line">Guides</h6>
<ul class="icons-list">
<li><a href="guides/generate-address.html">Generate A Bitcoin Address</a></li>
<li><a href="guides/scripting.html">Intro to Scripting</a></li>
<li><a href="guides/op_return.html">Create an OP_RETURN</a></li>
<!--<li><a data-toggle="" href="">Quick Sync (Torrent) </a></li>-->
</ul>
</div>
<!-- END CATEGORIES WIDGET -->
<!-- TEXT WIDGET -->
<div class="widget">
<h6 class="montserrat text-uppercase bottom-line">Looking for Docs?</h6>
<p>Checkout our <a href="../api-docs/index.html">API Docs</a> or the <a href="http://bcoin.io/docs/index.html">Full Documentation</a></p>
</div>
<!-- END TEXT WIDGET -->
<!-- TEXT WIDGET -->
<div class="widget">
<h6 class="montserrat text-uppercase bottom-line">Get Involved</h6>
<p>If you think you've got what it takes to make your own bcoin guides and tutorials, reach out to us on <a href="slack-signup.html"> Slack!</a></p>
<p>Want to join the team?<a href="https://angel.co/purse/jobs/90956-bitcoin-protocol-engineer-bcoin"> We’re hiring.</a></p>
</div>
<!-- END TEXT WIDGET -->
</div>
<!-- END SIDEBAR -->
<!-- NEW BLOG CONTENT -->
<div class="col-sm-9 blog-content post-thumbnail">
<div class="col-sm-1"></div>
<div class="col-sm-11 guide-section-title montserrat text-uppercase bottom-line2">OS Installs</div>
<!-- OS INSTALLS -->
<article class="post format-image">
<div class="row">
<div class="col-sm-1"></div>
<!-- images not used yet
<div class="col-sm-3">
<div class="post-preview">
<a href="#"><img src="assets/images/guides/get-started.png" alt=""></a>
</div>
</div> -->
<div class="col-sm-3 guide-block">
<a href="guides/install-linux.html">
<div class="os-install text-center" style="color:#000;">
<i class="fa fa-linux fa-4x"></i>
<h2 class="">Linux Install</h2>
</div>
</a>
</div>
<div class="col-sm-3 guide-block">
<a href="guides/install-mac.html">
<div class="os-install text-center" style="color:#000;">
<i class="fa fa-apple fa-4x"></i>
<h2 class="">Mac Install</h2>
</div>
</a>
</div>
<div class="col-sm-3 guide-block">
<a href="guides/install-windows.html">
<div class="os-install text-center" style="color:#000;">
<i class="fa fa-windows fa-4x"></i>
<h2 class="">Win Install</h2>
</div>
</a>
</div>
</div>
</article>
<!-- END POST IMAGE -->
<div class="col-sm-1"></div>
<div class="col-sm-11 guide-section-title montserrat text-uppercase bottom-line2">Guides</div>
<!-- GENERATE BITCOIN ADDRESS GUIDE -->
<article class="post format-image">
<div class="row">
<div class="col-sm-1"></div>
<!-- images not used yet
<div class="col-sm-3">
<div class="post-preview">
<a href="#"><img src="assets/images/guides/get-started.png" alt=""></a>
</div>
</div> -->
<div class="col-sm-10">
<div class="post-content" style="color:#000;">
<h2 class="post-title"><a href="guides/generate-address.html"><!--<i class="fa fa-linux"></i>-->Generate a Bitcoin Address</a></h2>
<ul class="post-meta">
<li>By Javed Khan</li>
</ul>
<p>Follow along with the steps to build a transaction from scratch using built-in bcoin utilities. These steps are based on those outlined in the <a href="https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses">Bitcoin Wiki</a>.</p>
<a href="guides/generate-address.html" class="btn btn-lg btn-link btn-base">Start ›</a>
</div>
</div>
</div>
</article>
<!-- INTRO TO SCRIPTING -->
<article class="post format-image">
<div class="row">
<div class="col-sm-1"></div>
<!-- images not used yet
<div class="col-sm-3">
<div class="post-preview">
<a href="#"><img src="assets/images/guides/get-started.png" alt=""></a>
</div>
</div> -->
<div class="col-sm-10">
<div class="post-content" style="color:#000;">
<h2 class="post-title"><a href="guides/scripting.html"><!--<i class="fa fa-linux"></i>-->Intro to Scripting</a></h2>
<ul class="post-meta">
<li>By JJ</li>
</ul>
<p>Scripts are array-like objects with some helper functions. Learn the basics here.</p>
<a href="guides/scripting.html" class="btn btn-lg btn-link btn-base">Start ›</a>
</div>
</div>
</div>
</article>
<!-- OP_RETURN -->
<article class="post format-image">
<div class="row">
<div class="col-sm-1"></div>
<!-- images not used yet
<div class="col-sm-3">
<div class="post-preview">
<a href="#"><img src="assets/images/guides/get-started.png" alt=""></a>
</div>
</div> -->
<div class="col-sm-10">
<div class="post-content" style="color:#000;">
<h2 class="post-title"><a href="guides/op_return.html"><!--<i class="fa fa-linux"></i>-->Create an OP_RETURN</a></h2>
<ul class="post-meta">
<li>By Javed Khan</li>
</ul>
<p>This example creates a transaction with output containing a null data script with our data.</p>
<a href="guides/op_return.html" class="btn btn-lg btn-link btn-base">Start ›</a>
</div>
</div>
</div>
</article>
<!-- END POST IMAGE -->
</div>
<!-- END BLOG CONTENT -->
</div><!-- .row -->
</div>
</section>
<!-- END NEW BLOGS -->
</div><!-- .row -->
</div>
</section>
<!-- END BLOGS -->
<!-- PARALLAX DOCS CTA -->
<section class="module bg-white-alfa-30 parallax color-white" data-background="assets/images/bg-header.jpg">
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="text-center">
<h2 class="montserrat text-uppercase m-b-30">Ready to start building? Read the docs!</h2>
<a href="./api-docs/index.html" target="_blank" class="btn btn-lg btn-purple">Documentation</a>
</div>
</div>
</div><!-- .row -->
</div>
</section>
<!-- END PARALLAX DOCS CTA -->
<!-- FOOTER -->
<footer id="footer" class="footer-minimal">
<div class="container">
<div class="row">
<div class="col-sm-12">
<ul class="social-icons social-icons-circle text-center m-b-35">
<li><a href="https://twitter.com/bcoin"><i class="fa fa-twitter"></i></a></li>
<li><a href="https://github.com/bcoin-org/bcoin"><i class="fa fa-github"></i></a></li>
<li><a href="slack-signup.html" target="_blank"><i class="fa fa-slack"></i></a></li>
</ul>
</div>
</div>
<div class="row">
<div class="col-sm-12 text-center m-b-35">
<img class="m-b-35 QR-code" src="assets/images/donation_QR.png"/>
<p class="m-0"><strong>Bcoin Development Donation Address:</strong><br />3Bi9H1hzCHWJoFEjc4xzVzEMywi35dyvsV</p>
</div>
</div>
<div class="row">
<div class="col-sm-12 text-center">
<p class="m-0">Copyright <a href="#">bcoin.io, Purse</a>, 2017, All Rights Reserved.</p>
</div>
</div>
</div>
</footer>
<!-- END FOOTER -->
</div>
<!-- /WRAPPER -->
<!-- JAVASCRIPT FILES -->
<script src="assets/js/jquery-2.2.3.min.js"></script>
<script src="http://maps.googleapis.com/maps/api/js?v=3"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script src="assets/js/plugins.min.js"></script>
<script src="assets/js/stickyfill.min.js"></script>
<script src="assets/js/custom.min.js"></script>
<!-- github button js -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
</body>
</html>

405
guides/test.html

@ -1,405 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>bcoin | Extending Bitcoin into Enterprise & Production</title>
<!-- Favicons -->
<!-- old
<link rel="shortcut icon" href="../assets/images/bcoin-ico.png">-->
<!-- generated from http://www.favicon-generator.org/ -->
<link rel="apple-touch-icon" sizes="57x57" href="../assets/images/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="../assets/images/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="../assets/images/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="../assets/images/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="../assets/images/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="../assets/images/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="../assets/images/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="../assets/images/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="../assets/images/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="../assets/images/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="../assets/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="../assets/images/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="../assets/images/favicon-16x16.png">
<link rel="manifest" href="../assets/images/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="../assets/images/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- Web Fonts -->
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,400italic,400,600,700' rel='stylesheet'>
<link href='https://fonts.googleapis.com/css?family=Montserrat:700' rel='stylesheet' type='text/css'>
<!-- Bootstrap core CSS -->
<link href="../assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Code Snippet CSS -->
<link href="../assets/css/prism.css" rel="stylesheet">
<!-- Icon Fonts -->
<link href="../assets/css/font-awesome.min.css" rel="stylesheet">
<link href="../assets/css/simple-line-icons.css" rel="stylesheet">
<!-- Plugins -->
<link href="../assets/css/magnific-popup.css" rel="stylesheet">
<link href="../assets/css/owl.carousel.css" rel="stylesheet">
<link href="../assets/css/flexslider.css" rel="stylesheet">
<link href="../assets/css/animate.min.css" rel="stylesheet">
<!-- Template core CSS -->
<link href="../assets/css/vertical.min.css" rel="stylesheet">
<link href="../assets/css/template.css" rel="stylesheet">
<!-- Google Analytics Tracking -->
<script>
(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','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-96446060-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<!-- PRELOADER -->
<div class="page-loader">
<div class="img-loader">Loading...
<!-- Bcoin logo in SVG -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 200 56" style="enable-background:new 0 0 200 56;" xml:space="preserve">
<g id="XMLID_108_">
<g id="XMLID_123_">
<path id="XMLID_124_" d="M8.4,51.8H3.2V4.2h5.2v19.2h0.8c1.2-2,2.8-3.6,4.8-4.7c2-1.1,4.3-1.6,6.7-1.6c2,0,4,0.4,5.8,1.2
c1.8,0.8,3.4,1.9,4.8,3.3c1.4,1.5,2.5,3.2,3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,0.9c-1.4,0.6-2.6,1.5-3.6,2.6c-1,1.1-1.8,2.4-2.4,3.9
c-0.6,1.5-0.9,3.2-0.9,5v0.8c0,1.9,0.3,3.6,0.9,5.1c0.6,1.5,1.4,2.8,2.4,3.9c1,1.1,2.2,1.9,3.6,2.5C97.5,47.5,99,47.7,100.6,47.7z
"/>
</g>
<g id="XMLID_112_">
<path id="XMLID_113_" d="M127.6,46.9h11.6V23h-10.4v-4.9h15.6v28.9h10.8v4.9h-27.6V46.9z M137.1,8c0-1.3,0.5-2.4,1.4-3.4
c0.9-0.9,2-1.4,3.3-1.4c1.3,0,2.4,0.5,3.3,1.4c0.9,0.9,1.4,2.1,1.4,3.4c0,1.3-0.5,2.4-1.4,3.4c-0.9,0.9-2,1.4-3.3,1.4
c-1.3,0-2.4-0.5-3.3-1.4C137.5,10.4,137.1,9.3,137.1,8z"/>
</g>
<g id="XMLID_109_">
<path id="XMLID_110_" d="M172.8,51.8h-5.2V18.1h5.2v5.7h0.8c2-4.4,5.6-6.7,10.7-6.7c3.8,0,6.9,1.2,9.1,3.6
c2.3,2.4,3.4,6.1,3.4,10.9v20.2h-5.2V32.8c0-3.5-0.8-6.2-2.3-8c-1.6-1.8-3.7-2.7-6.3-2.7c-3.2,0-5.6,1.1-7.4,3.3s-2.7,5.1-2.7,8.8
V51.8z"/>
</g>
</g>
</svg>
</div>
</div>
<!-- END PRELOADER -->
<!-- HEADER -->
<header class="header js-stick">
<div class="container">
<!-- YOUR LOGO HERE -->
<div class="inner-header">
<a class="inner-brand" href="../index.html">
<img class="brand-light" src="../assets/images/logo-light.png" width="100" alt="">
<img class="brand-dark" src="../assets/images/logo-dark.png" width="100" alt="">
</a>
</div>
<!-- OPEN MOBILE MENU -->
<div class="main-nav-toggle">
<div class="nav-icon-toggle" data-toggle="collapse" data-target="#custom-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</div>
</div>
<!-- WIDGETS MENU -->
<div class="inner-header pull-right hide-me">
<div class="menu-extras clearfix">
<!-- SLACK LINK -->
<div class="menu-item">
<div class="">
<a href="../slack-signup.html" target="_blank" id="" data-toggle="tooltip" title="" data-placement="bottom" data-original-title="Join us on Slack!">
<img src="../assets/images/slack_icon.svg" width="18" height="18"/>
<span class=""></span>
</a>
</div>
</div>
<!-- STACK EXCHANGE LINK -->
<div class="menu-item">
<div class="">
<a href="https://bitcoin.stackexchange.com/questions/tagged/bcoin" target="_blank" id="" data-toggle="tooltip" title="" data-placement="bottom" data-original-title="Questions! Checkout Stack Exchange.">
<img src="../assets/images/stack-exchange-icon.svg" width="18" height="18"/>
<span class=""></span>
</a>
</div>
</div>
<!-- GITHUB STUFF -->
<div class="menu-item">
<div class="">
<a href="https://github.com/bcoin-org/bcoin" target="_blank" id="" data-toggle="tooltip" title="" data-placement="bottom" data-original-title="Visit bcoin on GitHub to see the code!">
<img src="../assets/images/github_icon.svg" width="18" height="18"/>
<span class=""></span>
</a>
</div>
</div>
<div class="menu-item">
<div class="ghbuttons">
<a class="github-button" href="https://github.com/bcoin-org/bcoin" data-icon="octicon-star" data-count-href="/bcoin-org/bcoin/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star bcoin-org/bcoin on GitHub">Star</a>
<a class="github-button" href="https://github.com/bcoin-org/bcoin/fork" data-icon="octicon-repo-forked" data-count-href="/bcoin-org/bcoin/network" data-show-count="true" data-count-aria-label="# forks on GitHub" aria-label="Fork bcoin-org/bcoin on GitHub">Fork</a>
</div>
</div>
</div>
</div>
<!-- MAIN MENU -->
<nav id="custom-collapse" class="main-nav collapse clearfix">
<ul class="inner-nav pull-right">
<!-- HOME -->
<li><a href="../index.html">Home</a></li>
<!-- END HOME -->
<!-- FEATURES -->
<li><a href="../index.html#features">What is Bcoin</a></li>
<!-- END FEATURES -->
<!-- GUIDES -->
<li><a href="../guides.html">Guides</a></li>
<!-- GUIDES -->
<!-- API REFERENCE - newer, how to interact once you're setup -->
<li><a href="../api-docs/index.html">API Docs</a></li>
<!-- END API -->
<!-- FULL DOCS - older, full reference
<li><a href="http://bcoin.io/docs/index.html">Docs</a></li> -->
<!-- END DOCS -->
<!-- DIVIDER
<li><a>&nbsp;</a></li>
<li><a href="#">All Demos</a></li>-->
</ul>
</nav>
</div>
</header>
<!-- END HEADER -->
<!-- WRAPPER -->
<div class="wrapper">
<!-- PAGE TITLE -->
<section class="module-sm bg-white-dark" data-background="../assets/images/bg-header.jpg">
<div class="container">
<div class="row">
<div class="col-sm-12 text-center">
<h2 class="montserrat text-uppercase m-b-10"><span class="text-highlight-black" style="line-height: 1.5;">&nbsp;Guides &nbsp;and &nbsp;Videos&nbsp;</span></h2>
</div>
</div>
</div>
</section>
<!-- END PAGE TITLE -->
<!-- GUIDES/TUTORIALS -->
<section class="module" style="padding-top:70px !important;">
<div class="container">
<div class="row">
<!-- START SIDEBAR -->
<div class="col-sm-3 sidebar">
<!-- CATEGORIES WIDGET -->
<div class="widget guide-list">
<h6 class="montserrat text-uppercase bottom-line">Install</h6>
<ul class="icons-list">
<!-- INSTALL-LIST -->
<li><a href="install-windows.html">Install on Windows (Video)</a></li>
<li><a href="install-mac.html">Install on Mac OS (Video)</a></li>
<li><a href="install-linux.html">Install on Linux (Video)</a></li>
<!-- /INSTALL-LIST -->
</ul>
<br>
<h6 class="montserrat text-uppercase bottom-line">Guides</h6>
<ul class="icons-list">
<!-- GUIDES-LIST -->
<li><a href="test.html">Test a Guide</a></li>
<li><a href="scripting.html">Intro to Scripting</a></li>
<li><a href="op_return.html">Create an OP_RETURN output transaction</a></li>
<li><a href="generate-address.html">Generate an Address</a></li>
<!-- /GUIDES-LIST -->
</ul>
</div>
<!-- END CATEGORIES WIDGET -->
<!-- TEXT WIDGET -->
<div class="widget">
<h6 class="montserrat text-uppercase bottom-line">Looking for Docs?</h6>
<p>Checkout our <a href="../api-docs/index.html">API Docs</a> or the <a href="http://bcoin.io/docs/index.html">Full Documentation</a></p>
</div>
<!-- END TEXT WIDGET -->
<!-- TEXT WIDGET -->
<div class="widget">
<h6 class="montserrat text-uppercase bottom-line">Get Involved</h6>
<p>If you think you've got what it takes to make your own bcoin guides and tutorials, reach out to us on <a href="../slack-signup.html"> Slack!</a></p>
<p>Want to join the team?<a href="https://angel.co/purse/jobs/90956-bitcoin-protocol-engineer-bcoin"> We’re hiring.</a></p>
</div>
<!-- END TEXT WIDGET -->
</div>
<!-- END SIDEBAR -->
<!-- START OF ARTICLE CONTAINER -->
<div class="col-sm-9 blog-content post-thumbnail">
<!-- POST IMAGE -->
<article class="post format-image">
<div class="row">
<!--<div class="col-sm-5">
<div class="post-preview">
<a href="#"><img src="../assets/images/guides/get-started.png" alt=""></a>
</div>
</div>-->
<!-- after re-enabling the above code, change the col-sm below to col-sm-7 -->
<div class="panel-group">
<div class="col-sm-12 panel panel-default">
<div class="post-content" style="color:#000;">
<!-- START OF GUIDE -->
<h2 class="post-title panel-title">Test a Guide</h2><ul class="post-meta"><li class="author">By John Snow</li></ul><pre class="line-numbers language-javascript"><code class="line-numbers language-javascript">console<span class="token punctuation">.</span><span class="token function">log</span><span class="token punctuation">(</span><span class="token string">'well whadya know it works!'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></code></pre><p>Pretty cool!</p>
<!-- END OF GUIDE -->
</div>
</div>
</div>
</div>
</article>
<!-- END OF ARTICLE CONTAINER -->
</div>
<!-- END BLOG CONTENT -->
</div><!-- .row -->
</div>
</section>
<!-- END NEW BLOGS -->
</div><!-- .row -->
</div>
</section>
<!-- END BLOGS -->
<!-- PARALLAX DOCS CTA -->
<section class="module bg-white-alfa-30 parallax color-white" data-background="../assets/images/bg-header.jpg">
<div class="container">
<div class="row">
<div class="col-sm-12">
<div class="text-center">
<h2 class="montserrat text-uppercase m-b-30">Ready to start building? Read the docs!</h2>
<a href="http://bcoin.io/docs/index.html" target="_blank" class="btn btn-lg btn-purple">Documentation</a>
</div>
</div>
</div><!-- .row -->
</div>
</section>
<!-- END PARALLAX DOCS CTA -->
<!-- FOOTER -->
<footer id="footer" class="footer-minimal">
<div class="container">
<div class="row">
<div class="col-sm-12">
<ul class="social-icons social-icons-circle text-center m-b-35">
<li><a href="https://twitter.com/bcoin"><i class="fa fa-twitter"></i></a></li>
<li><a href="https://github.com/bcoin-org/bcoin"><i class="fa fa-github"></i></a></li>
<li><a href="../slack-signup.html" target="_blank"><i class="fa fa-slack"></i></a></li>
</ul>
</div>
</div>
<div class="row">
<div class="col-sm-12 text-center m-b-35">
<img class="m-b-35 QR-code" src="../assets/images/donation_QR.png"/>
<p class="m-0"><strong>Bcoin Development Donation Address:</strong><br />3Bi9H1hzCHWJoFEjc4xzVzEMywi35dyvsV</p>
</div>
</div>
<div class="row">
<div class="col-sm-12 text-center">
<p class="m-0">Copyright <a href="#">bcoin.io, Purse</a>, 2017, All Rights Reserved.</p>
</div>
</div>
</div>
</footer>
<!-- END FOOTER -->
</div>
<!-- /WRAPPER -->
<!-- JAVASCRIPT FILES -->
<script src="../assets/js/jquery-2.2.3.min.js"></script>
<script src="http://maps.googleapis.com/maps/api/js?v=3"></script>
<script src="../assets/bootstrap/js/bootstrap.min.js"></script>
<script src="../assets/js/plugins.min.js"></script>
<script src="../assets/js/stickyfill.min.js"></script>
<script src="../assets/js/custom.min.js"></script>
<script async defer src="../assets/js/prism.js"></script>
<!-- github button js -->
<script async defer src="https://buttons.github.io/buttons.js"></script>
</body>
</html>

11
utils/createHTML.js

@ -82,8 +82,13 @@ const createHTML = async function createHTML(markdownFile, htmlFile, author, pos
template = insertToTemplate(template, GUIDE_START, blogText);
// create the html file for final output
fs.writeFileSync(htmlFile, template);
console.log(`Finished ${path.basename(htmlFile)}`);
return new Promise((resolve, reject) => {
fs.writeFile(htmlFile, template, {flags: 'w+'}, (err) => {
if (err) reject(err);
resolve(htmlFile)
});
})
.then((htmlFile) => console.log(`Finished ${path.basename(htmlFile)}!`));
}
module.exports = createHTML;
module.exports = createHTML;

14
utils/generateArchive.js

@ -24,19 +24,31 @@ const generateArchive = async function(archiveName, rootDirectory) {
archiveTemplate = insertToTemplate(archiveTemplate, SIDEBAR_START, sidebarText);
// collect post information of guides to add in archive
// `posts` returns an array of objects storing the info for each post
const posts = await getPostInfo(markdownDir);
let archiveItemTemplate = fs.readFileSync(itemTemplatePath).toString();
// Use the underscore templating engine for filling in post info in our template html
archiveItemTemplate = _.template(archiveItemTemplate);
// Let's start building out the text for the archives list
let archives = '<div class="col-sm-1"></div>';
archives += '<div class="col-sm-11 guide-section-title montserrat text-uppercase bottom-line2">Guides</div>';
archives += '\n';
// Add each post to the list
_.each(posts, (post) => {
// need to get the relative file path
// need to get the relative file path and convert to html since that's what we're linking to
const filePath = post.fileName.replace(/\.[^/.]+$/, ".html");
post.filePath = archiveName.concat('/', filePath);
// Add archive item from template
archives += archiveItemTemplate(post);
archives += '\n';
});
// Once our archives are ready, add the list into the archive page template
archiveTemplate = insertToTemplate(archiveTemplate, ARCHIVES_START, archives);
return archiveTemplate;

6
utils/generatePages.js

@ -16,7 +16,7 @@ const generatePages = async (markdownDir, all, rootDir) => {
// since the `fs.readdir` is an async callback that we'd like to `await` on
return new Promise ((resolve, reject) => {
fs.readdir(markdownDir, async (err, files) => {
if (err) throw err;
if (err) reject(err);
for (let i=0; i < files.length; i++) {
const file = files[i];
const ext = path.extname(file);
@ -33,7 +33,7 @@ const generatePages = async (markdownDir, all, rootDir) => {
}
// once we've converted all markdown files in the folder
// we can resolve our promise and continue in our promise/await chain
resolve();
resolve(files);
});
})
} else {
@ -43,4 +43,4 @@ const generatePages = async (markdownDir, all, rootDir) => {
}
}
module.exports = generatePages;
module.exports = generatePages;

12
utils/helpers.js

@ -4,6 +4,10 @@ const assert = require('assert');
const marked = require('marked');
const getPostMeta = (author='bcoin-org') => '<ul class="post-meta">'
+ '<li class="author">By ' + author + '</li>'
+ '</ul>';
const insertToTemplate = (template, targetText, customText) => {
assert(typeof template === 'string', 'template must be a string');
assert(typeof customText === 'string', 'customText must be a string');
@ -79,14 +83,8 @@ const getPostInfo = function getPostInfo(pathToFiles, postMeta) {
});
}
const getPostMeta = (author='bcoin-org') => '<ul class="post-meta">'
+ '<li class="author">By ' + author + '</li>'
+ '</ul>';
module.exports = {
insertToTemplate,
getPostMeta,
getPostInfo
};
};

Loading…
Cancel
Save