Deploy website

Deploy website version based on 33ed6fc765
This commit is contained in:
Website Deployment Script 2017-11-01 20:42:10 +00:00
parent 33ed6fc765
commit c7b7a9e8dc
4 changed files with 9 additions and 9 deletions

View file

@ -5,9 +5,9 @@
nav.classList.toggle('docsSliderActive');
};
</script></nav></div><div class="container mainContainer documentContainer postContainer blogContainer"><div class="wrapper"><div class="lonePost"><div class="post"><header class="postHeader"><h1><a href="/blog/2017/09/25/testing-rss.html">Adding RSS Support - RSS Truncation Test</a></h1><p class="post-meta">September 25, 2017</p><div class="authorBlock"><p class="post-authorName"><a href="http://twitter.com/ericnakagawa" target="_blank">Eric Nakagawa</a></p><div class="authorPhoto"><a href="http://twitter.com/ericnakagawa" target="_blank"><img src="https://graph.facebook.com/661277173/picture/?height=200&amp;width=200"/></a></div></div></header><div><span><p>1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890</p>
<p>This should be truncated.
&lt;!--truncate--&gt;
This line should never render in XML.</p>
<p>This should be truncated.</p>
<!--truncate-->
This line should never render in XML.
</span></div></div></div><div class="blog-recent"><a class="button" href="/blog">Recent Posts</a></div></div></div></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div><h5>Docs</h5><a href="
/docs/installation.html">Getting Started</a></div><div><h5>Community</h5><a href="/en/users.html">User Showcase</a></div><div><h5>More</h5><a href="https://github.com/facebookexperimental/docusaurus">GitHub</a><a class="github-button" href="https://github.com/facebookexperimental/docusaurus" data-icon="octicon-star" data-show-count="true" aria-label="Star this project on GitHub">Star</a></div></section><a href="https://code.facebook.com/projects/" target="_blank" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2017 Facebook Inc.</span></section></footer></div><script type="text/javascript" src="//cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>
var search = docsearch({

View file

@ -52,7 +52,7 @@
<span class="hljs-string">Or</span> <span class="hljs-string">this.</span>
</code></pre>
<h2><a class="anchor" aria-hidden="true" name="rss-feed"></a><a href="#rss-feed" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>RSS Feed</h2>
<p>Docusaurus provides a simple RSS feed for your blog posts. Both RSS and Atom feed formats are supported. This data is automatically to your website page's HTML &lt;HEAD&gt; tag.</p>
<p>Docusaurus provides a simple RSS feed for your blog posts. Both RSS and Atom feed formats are supported. This data is automatically to your website page's HTML <HEAD> tag.</p>
<p>A summary of the post's text is provided in the RSS feed up to the <code>&lt;!--truncate--&gt;</code>. If no <code>&lt;!--truncate--&gt;</code> tag is found, then all text up 250 chacters are used.</p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="navigation.html">← Navigation and Sidebars</a><a class="docs-next button" href="translation.html">Translations &amp; Localization →</a></div></div></div></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div><h5>Docs</h5><a href="
/docs/installation.html">Getting Started</a></div><div><h5>Community</h5><a href="/en/users.html">User Showcase</a></div><div><h5>More</h5><a href="https://github.com/facebookexperimental/docusaurus">GitHub</a><a class="github-button" href="https://github.com/facebookexperimental/docusaurus" data-icon="octicon-star" data-show-count="true" aria-label="Star this project on GitHub">Star</a></div></section><a href="https://code.facebook.com/projects/" target="_blank" class="fbOpenSource"><img src="/img/oss_logo.png" alt="Facebook Open Source" width="170" height="45"/></a><section class="copyright"><span>Copyright © 2017 Facebook Inc.</span></section></footer></div><script type="text/javascript" src="//cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script><script>

View file

@ -19,7 +19,7 @@
<p>Deploying your Docusaurus site to GitHub Pages is straightforward if you are already using GitHub to host your project. Your code repository does not even need to be public. Most of the work is done for you automatically through the <a href="./commands.md#docusaurus-publish"><code>publish-gh-pages</code></a> script.</p>
<p>Before you go ahead and do that, you need to determine the values for a few parameters required by the script. They are:</p>
<ul>
<li><code>CIRCLE_PROJECT_REPONAME</code>: The name of the GitHub repository for your project. For example, Docusaurus is hosted at https://github.com/facebookexperimental/docusaurus, so our repo name in this case would be &quot;docusaurus&quot;.</li>
<li><code>CIRCLE_PROJECT_REPONAME</code>: The name of the GitHub repository for your project. For example, Docusaurus is hosted at <a href="https://github.com/facebookexperimental/docusaurus">https://github.com/facebookexperimental/docusaurus</a>, so our repo name in this case would be &quot;docusaurus&quot;.</li>
<li><code>CIRCLE_PROJECT_USERNAME</code>: The GitHub user or organization that owns the repository. In the case of Docusaurus, that would be the &quot;facebookexperimental&quot; GitHub organization.</li>
<li><code>GITHUB_USERNAME</code>: The username for a GitHub account that has commit access to this repo. For your own repositories, this will usually be your own GitHub username.</li>
<li><code>CIRCLE_BRANCH</code>: The branch that contains the latest docs changes that will be deployed. Usually, &quot;master&quot;.</li>
@ -31,15 +31,15 @@
<span class="hljs-attribute">CIRCLE_BRANCH</span>=master \
yarn <span class="hljs-builtin-name">run</span> publish-gh-pages
</code></pre>
<p>You should now be able to load your website by visiting its GitHub Pages URL, which should be something along the lines of https://CIRCLE_PROJECT_USERNAME.github.io/CIRCLE_PROJECT_REPONAME. For example, Docusaurus's own GitHub Pages URL is https://facebookexperimental.github.io/docusaurus, because it is served from the <code>gh-pages</code> branch of the https://github.com/facebookexperimental/docusaurus GitHub repo. We highly encourage reading through the <a href="https://pages.github.com">GitHub Pages documentation</a> to learn more about how this hosting solution works.</p>
<p>You should now be able to load your website by visiting its GitHub Pages URL, which should be something along the lines of <a href="https://CIRCLE_PROJECT_USERNAME.github.io/CIRCLE_PROJECT_REPONAME">https://CIRCLE_PROJECT_USERNAME.github.io/CIRCLE_PROJECT_REPONAME</a>. For example, Docusaurus's own GitHub Pages URL is <a href="https://facebookexperimental.github.io/docusaurus">https://facebookexperimental.github.io/docusaurus</a>, because it is served from the <code>gh-pages</code> branch of the <a href="https://github.com/facebookexperimental/docusaurus">https://github.com/facebookexperimental/docusaurus</a> GitHub repo. We highly encourage reading through the <a href="https://pages.github.com">GitHub Pages documentation</a> to learn more about how this hosting solution works.</p>
<p>You can run the command above any time you update the docs and wish to deploy the changes to your site. That's usually fine for sites where the documentation rarely changes, where it's not too much of an inconvenience to remember to manually deploy changes. Now, if you're wondering if this process can be automated in any way, keep reading...</p>
<h2><a class="anchor" aria-hidden="true" name="automating-deployments-using-continuous-integration"></a><a href="#automating-deployments-using-continuous-integration" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Automating Deployments Using Continuous Integration</h2>
<p>Continuous integration services are typically used to perform routine tasks whenever new commits are checked in to source control. These tasks can be any combination of running unit tests and integration tests, automating builds, publishing packages to NPM, and yes, deploying changes to your website. All you need to do to automate deployment of your website is to invoke the <code>publish-gh-pages</code> script whenever your docs get updated. In the following section we'll be covering how to do just that using Circle CI, a popular continuous integration service provider.</p>
<h3><a class="anchor" aria-hidden="true" name="using-circle-ci"></a><a href="#using-circle-ci" aria-hidden="true" class="hash-link" ><svg aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Using Circle CI</h3>
<p>If you're already using Circle CI for your project, all you need to do to enable automatic deployments is to configure Circle to run the <code>publish-gh-pages</code> script as part of the deployment step.</p>
<ol>
<li>Go to https://github.com/settings/tokens and generate a new token, granting it full control of private repositories through the <code>repo</code> access scope. Store this token in a safe place, making sure to not share it with anyone. This token can be used to authenticate GitHub actions on your behalf in place of your GitHub password.</li>
<li>Open your Circle CI dashboard, and navigate to the Settings page for your repository, then select &quot;Environment variables&quot;. The URL looks like https://circleci.com/gh/facebookexperimental/docusaurus/edit#env-vars, where &quot;facebookexperimental/docusaurus&quot; should be replaced with your own GitHub user/repo.</li>
<li>Go to <a href="https://github.com/settings/tokens">https://github.com/settings/tokens</a> and generate a new token, granting it full control of private repositories through the <code>repo</code> access scope. Store this token in a safe place, making sure to not share it with anyone. This token can be used to authenticate GitHub actions on your behalf in place of your GitHub password.</li>
<li>Open your Circle CI dashboard, and navigate to the Settings page for your repository, then select &quot;Environment variables&quot;. The URL looks like <a href="https://circleci.com/gh/facebookexperimental/docusaurus/edit#env-vars">https://circleci.com/gh/facebookexperimental/docusaurus/edit#env-vars</a>, where &quot;facebookexperimental/docusaurus&quot; should be replaced with your own GitHub user/repo.</li>
<li>Create a new environment variable named &quot;GITHUB_TOKEN&quot;, using your newly generated access token as the value.</li>
<li>Open your <code>circle.yml</code> file and add the following under the <code>machine:</code> section to tell Circle to use relatively recent versions of node and npm, replacing npm with yarn if applicable:</li>
</ol>

View file

@ -45,7 +45,7 @@
<li><code>cd website</code></li>
<li>Rename <code>blog-examples-from-docusaurus</code> to <code>blog</code>.</li>
<li>Run the local webserver via <code>yarn run start</code> or <code>npm run start</code>.</li>
<li>Load the example site at http://localhost:3000. You should see the example site loaded in your web browser.</li>
<li>Load the example site at <a href="http://localhost:3000">http://localhost:3000</a>. You should see the example site loaded in your web browser.</li>
</ol>
<p><img src="/img/getting-started-preparation-verify.png" alt=""></p>
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="installation.html">← Installation</a><a class="docs-next button" href="site-creation.html">Creating your site →</a></div></div></div></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div><h5>Docs</h5><a href="