{"data":{"markdownRemark":{"html":"<h2 id=\"start-dev-server\"><a href=\"#start-dev-server\" aria-hidden class=\"anchor\"><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>Start dev-server</h2>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"language-sh\"><code class=\"language-sh\">npm run start</code></pre></div>\n<p>This command run local development server with hot-reloading on files changes.</p>\n<p>You can access this server at <a href=\"http://localhost:4000\">http://localhost:4000</a></p>\n<blockquote>\n<p>If you want to change port, you can do this by editing <code class=\"language-text\">package.json</code> <strong>scripts</strong> section.</p>\n</blockquote>\n<h2 id=\"graphiql\"><a href=\"#graphiql\" aria-hidden class=\"anchor\"><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>GraphiQL</h2>\n<p>Besides dev-server on root URL, you can access <strong>GraphiQL</strong> <em>(GraphQL integrated development environment)</em> on special URL: <a href=\"http://localhost:4000/___graphql\">http://localhost:4000/___graphql</a>.</p>\n<p>This tool is provided by <a href=\"https://www.gatsbyjs.org/tutorial/part-five/\">GatsbyJS</a>, and could be very usefull in output customization cases.</p>\n<h2 id=\"structure\"><a href=\"#structure\" aria-hidden class=\"anchor\"><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>Structure</h2>\n<p>Project have some rules of pages organization.</p>\n<p>First of all, look at the <code class=\"language-text\">src</code> directory and what it contains:</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"language-sh\"><code class=\"language-sh\">src\n├── components\n├── config.js\n├── media\n├── pages\n├── posts\n└── templates</code></pre></div>\n<ul>\n<li><strong><code class=\"language-text\">components</code></strong> - contains React components, building blocks for application.</li>\n<li><strong><code class=\"language-text\">media</code></strong> - media content <em>(like images)</em> store for posts.</li>\n<li><strong><code class=\"language-text\">pages</code></strong> - сustom pages with own routes, builded with components.</li>\n<li><strong><code class=\"language-text\">templates</code></strong> - page wrappers for inject data, extracted from markdown posts.</li>\n<li><strong><code class=\"language-text\">posts</code></strong> - contains posts, divided by sections.</li>\n</ul>\n<h2 id=\"sections\"><a href=\"#sections\" aria-hidden class=\"anchor\"><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>Sections</h2>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"language-sh\"><code class=\"language-sh\">src/posts\n├── common\n├── getting-started\n├── mobile\n├── ramail7\n└── sections.js</code></pre></div>\n<p>Every directory is a section. Name of every section append to URL of posts contained inside.</p>\n<p>You need to set order and display name to folders in <code class=\"language-text\">sections.js</code> for sidebar menu autogeneration.</p>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\"><span class=\"token keyword\">export</span> <span class=\"token keyword\">const</span> sections <span class=\"token operator\">=</span> <span class=\"token punctuation\">[</span>\n  <span class=\"token punctuation\">{</span> folder<span class=\"token punctuation\">:</span> <span class=\"token string\">'getting-started'</span><span class=\"token punctuation\">,</span> name<span class=\"token punctuation\">:</span> <span class=\"token string\">'Getting Started'</span> <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n  <span class=\"token punctuation\">{</span> folder<span class=\"token punctuation\">:</span> <span class=\"token string\">'examples'</span><span class=\"token punctuation\">,</span> name<span class=\"token punctuation\">:</span> <span class=\"token string\">'Some Section'</span> <span class=\"token punctuation\">}</span>\n<span class=\"token punctuation\">]</span><span class=\"token punctuation\">;</span></code></pre></div>\n<h2 id=\"posts\"><a href=\"#posts\" aria-hidden class=\"anchor\"><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>Posts</h2>\n<p>Every section have to contain ordered list of markdown files.</p>\n<div class=\"gatsby-highlight\" data-language=\"sh\"><pre class=\"language-sh\"><code class=\"language-sh\">src/posts/getting-started\n├── 01__install.md\n├── 02__usage.md\n└── ...</code></pre></div>\n<p>Post title and date are set in header of post.</p>\n<div class=\"gatsby-highlight\" data-language=\"md\"><pre class=\"language-md\"><code class=\"language-md\">---\ntitle: &#39;Usage Guide&#39;\ndate: &#39;2018-11-02&#39;\n---</code></pre></div>\n<p>All posts composed into sections on autogeneration stage.</p>","timeToRead":2,"excerpt":"Start dev-server This command run local development server with hot-reloading on files changes. You can access this server at  http…","frontmatter":{"title":"Usage Guide","date":"2018-11-02"},"fields":{"slug":"getting-started/usage"}}},"pageContext":{"slug":"getting-started/usage"}}