You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Build-your-Personal-Blog/index.html
+8-8
Original file line number
Diff line number
Diff line change
@@ -235,39 +235,39 @@ <h4 id="install-Git"><a href="#install-Git" class="headerlink" title="install Gi
235
235
<h3id="Set-up-github-io-Repository"><ahref="#Set-up-github-io-Repository" class="headerlink" title="Set up github.io Repository"></a>Set up github.io Repository</h3><p>Set your ssh key.</p>
236
236
<p>Name the repository as YourGithubName.github.io</p>
<h3id="Install-and-initialize-hexo"><ahref="#Install-and-initialize-hexo" class="headerlink" title="Install and initialize hexo"></a>Install and initialize hexo</h3><figureclass="highlight bash"><table><tr><tdclass="gutter"><pre><spanclass="line">1</span><br></pre></td><tdclass="code"><pre><spanclass="line">$ npm install -g hexo-cli</span><br></pre></td></tr></table></figure>
238
+
<h3id="Install-and-initialize-hexo"><ahref="#Install-and-initialize-hexo" class="headerlink" title="Install and initialize hexo"></a>Install and initialize hexo</h3><figureclass="highlight bash"><table><tr><tdclass="code"><pre><spanclass="line">$ npm install -g hexo-cli</span><br></pre></td></tr></table></figure>
239
239
<p>you can use <strong>hexo -v</strong> to check whether hexo is successfully installed.</p>
240
240
<p>Some common commands of hexo.</p>
241
241
<blockquote>
242
242
<p><strong>Hexo init</strong>: used to initialize the local folder as the root of the web site<br><strong>Hexo new / hexo n</strong>: used to create a new article<br><strong>Hexo generate / hexo G</strong>: used to generate static files<br><strong>Hexo server / hexo s</strong>: used to start the local server<br><strong>Hexo deploy / hero D</strong>: for deploying websites<br><strong>Hexo clean</strong>: used to clean cache files</p>
243
243
</blockquote>
244
244
<p>Then you can create a folder in favorite location, such as blog. </p>
<p><strong>brief introducation of the main files:</strong></p>
247
247
<blockquote>
248
248
<p><strong>_config.yml</strong>: global configuration file, which configures many information of the website, such as website name, subtitle, description, author, language, theme, deployment, etc.<br><strong>package.json</strong>: configure the parameters and dependent plug-ins of the hexo framework<br><strong>scaffolds</strong>: When a new article is created, hexo is built according to the files in this directory.<br><strong>source</strong>: All new articles are saved in this directory* Posts is where we write* MD files in the posts directory will be compiled into HTML files and put into the public folder.<br><strong>themes</strong>: website subject directory, the default is landscape<br><strong>node_modules</strong>: it is mainly used to store some functional files of hexo, such as renderers and various plug-ins<br><strong>public</strong>: store the generated static file and generate it after the hexo g command</p>
249
249
</blockquote>
250
-
<h3id="Edit-config-yml"><ahref="#Edit-config-yml" class="headerlink" title="Edit _config.yml"></a>Edit _config.yml</h3><figureclass="highlight yaml"><table><tr><tdclass="gutter"><pre><spanclass="line">1</span><br><spanclass="line">2</span><br><spanclass="line">3</span><br><spanclass="line">4</span><br></pre></td><tdclass="code"><pre><spanclass="line"><spanclass="attr">deploy:</span></span><br><spanclass="line"><spanclass="attr">type:</span><spanclass="string">'git'</span></span><br><spanclass="line"><spanclass="attr">branch:</span><spanclass="string">main</span></span><br><spanclass="line"><spanclass="attr">repo:</span><spanclass="string">'https://github.com/NatalieXSelina/NatalieXSelina.github.io.git'</span><spanclass="comment"># put your Github name here</span></span><br></pre></td></tr></table></figure>
250
+
<h3id="Edit-config-yml"><ahref="#Edit-config-yml" class="headerlink" title="Edit _config.yml"></a>Edit _config.yml</h3><figureclass="highlight yml"><table><tr><tdclass="code"><pre><spanclass="line"><spanclass="attr">deploy:</span></span><br><spanclass="line"><spanclass="attr">type:</span><spanclass="string">'git'</span></span><br><spanclass="line"><spanclass="attr">branch:</span><spanclass="string">main</span></span><br><spanclass="line"><spanclass="attr">repo:</span><spanclass="string">'https://github.com/NatalieXSelina/NatalieXSelina.github.io.git'</span><spanclass="comment"># put your Github name here</span></span><br></pre></td></tr></table></figure>
<figureclass="highlight bash"><table><tr><tdclass="gutter"><pre><spanclass="line">1</span><br></pre></td><tdclass="code"><pre><spanclass="line">$ hexo cl && hexo g && hexo s <spanclass="comment"># visit http://localhost:4000</span></span><br></pre></td></tr></table></figure>
256
+
<figureclass="highlight bash"><table><tr><tdclass="code"><pre><spanclass="line">$ hexo cl && hexo g && hexo s <spanclass="comment"># visit http://localhost:4000</span></span><br></pre></td></tr></table></figure>
257
257
258
258
<p>build remote websites</p>
259
-
<figureclass="highlight bash"><table><tr><tdclass="gutter"><pre><spanclass="line">1</span><br></pre></td><tdclass="code"><pre><spanclass="line">$ hexo cl && hexo g && hexo d <spanclass="comment"># vist https://nataliexselina.github.io/ here should be your githubname </span></span><br></pre></td></tr></table></figure>
259
+
<figureclass="highlight bash"><table><tr><tdclass="code"><pre><spanclass="line">$ hexo cl && hexo g && hexo d <spanclass="comment"># vist https://nataliexselina.github.io/ here should be your githubname </span></span><br></pre></td></tr></table></figure>
260
260
261
261
262
262
263
263
<h3id="Write-MD-File"><ahref="#Write-MD-File" class="headerlink" title="Write MD File"></a>Write MD File</h3><p>You can create a new MD file with the following command:</p>
264
-
<figureclass="highlight bash"><table><tr><tdclass="gutter"><pre><spanclass="line">1</span><br></pre></td><tdclass="code"><pre><spanclass="line">hexo new <spanclass="string">"articleTitle"</span></span><br></pre></td></tr></table></figure>
264
+
<figureclass="highlight bash"><table><tr><tdclass="code"><pre><spanclass="line">hexo new <spanclass="string">"articleTitle"</span></span><br></pre></td></tr></table></figure>
<h3id="Choose-the-theme-you-like"><ahref="#Choose-the-theme-you-like" class="headerlink" title="Choose the theme you like"></a>Choose the theme you like</h3><p>You can choose other themes to build blog with your style. <atarget="_blank" rel="noopener" href="https://hexo.io/themes/">https://hexo.io/themes/</a></p>
<h3id="How-to-Build-Categories-and-Tags"><ahref="#How-to-Build-Categories-and-Tags" class="headerlink" title="How to Build Categories and Tags"></a>How to Build Categories and Tags</h3><p><atarget="_blank" rel="noopener" href="https://hexo.io/docs/front-matter">https://hexo.io/docs/front-matter</a></p>
<p> When a function needs to be called in a number of other files, but does not need to be defined globally, you can use this way.</p>
242
242
</li>
243
243
</ol>
244
-
<h3id="Examples-for-call-methods"><ahref="#Examples-for-call-methods" class="headerlink" title="Examples for call methods"></a>Examples for call methods</h3><figureclass="highlight js"><table><tr><tdclass="gutter"><pre><spanclass="line">1</span><br><spanclass="line">2</span><br><spanclass="line">3</span><br><spanclass="line">4</span><br></pre></td><tdclass="code"><pre><spanclass="line">cy.<spanclass="title function_">login</span>() <spanclass="comment">// login() is defined in command.js</span></span><br><spanclass="line">cy.<spanclass="title function_">task</span>(<spanclass="string">'A'</span>) <spanclass="comment">// task A is defined in plugins/index.js</span></span><br><spanclass="line">cy.<spanclass="title function_">exec</span>(<spanclass="string">'node test.js'</span>) <spanclass="comment">// test.js is defined in root directory</span></span><br><spanclass="line">dash.<spanclass="title function_">check</span>() <spanclass="comment">// function check() is defined in dash.utils.js</span></span><br></pre></td></tr></table></figure>
244
+
<h3id="Examples-for-call-methods"><ahref="#Examples-for-call-methods" class="headerlink" title="Examples for call methods"></a>Examples for call methods</h3><figureclass="highlight javascript"><table><tr><tdclass="code"><pre><spanclass="line">cy.<spanclass="title function_">login</span>() <spanclass="comment">// login() is defined in command.js</span></span><br><spanclass="line">cy.<spanclass="title function_">task</span>(<spanclass="string">'A'</span>) <spanclass="comment">// task A is defined in plugins/index.js</span></span><br><spanclass="line">cy.<spanclass="title function_">exec</span>(<spanclass="string">'node test.js'</span>) <spanclass="comment">// test.js is defined in root directory</span></span><br><spanclass="line">dash.<spanclass="title function_">check</span>() <spanclass="comment">// function check() is defined in dash.utils.js</span></span><br></pre></td></tr></table></figure>
0 commit comments