Multiple git accounts and Hexo build blog Advanced

Source: Internet
Author: User
Tags cos ssh config ssh config file

multiple git accounts and Hexo build blog Advanced1. Generate Key

You can see that the generated Id_rsa is the key to the 0LinkSec git account.

And Yof3ng is the second Hexo key I'm going to build.

2. Configure the SSH config file (new config file in ssh directory)
#userName1Host 0LinkSecHostName github.compreferredauthentications publickeyidentityfile ~/.ssh/id_rsa?# Username2host yof3nghostname github.compreferredauthentications publickeyidentityfile ~/.ssh/yof3ng

  

          Span>         Span class= "cm-variable" > 
?

It is important to note that indentation problems may result in an error in indentation.

The next step is done after adding the SSH key on GitHub

3.git Connection Test

First account [email protected]:

Second account [email protected]:

Two accounts have been established and a second hexo will be built.

4. Second Hexo configuration config file after initialization

Emphasis repository: should be set as the second user set earlier, if [email protected] will default to the first user, connect 0LinkSec.

To this second Hexo build success.

5.souce Directory CNAME file established, and domain CNAME record established

For your domain name, create a new Yof3ng two domain name CNAME record, point to Yof3ng.github.io, and create a CNAME file in the source folder under the Hexo root directory, and fill in the Yof3ng.0link.top.

6. Turn on the Force HTTPS service option

Settings in GitHub corresponding repositories, setting options

7. Add a pet Genie

Reference links

Switch to the blog directory and enter:

  

Add within config file:

Live2d:  enable:true  scriptfrom:local  model:    Use:live2d-widget-model-koharu  Display:    position:right    width:140    height:260  Mobile:    show:true

  

8. Add Mouse click Effects

Add a mouse click to explode: Create a fireworks.js in the topic's JS directory and write the following code

"Use strict"; function Updatecoords (e) {pointerx= (e.clientx| | E.TOUCHES[0].CLIENTX)-canvasel.getboundingclientrect (). left,pointery=e.clienty| | E.touches[0].clienty-canvasel.getboundingclientrect (). Top}function setparticuledirection (e) {var t=anime.random ( 0,360) *math.pi/180,a=anime.random (50,180), N=[-1,1][anime.random (0,1)]*a;return{x:e.x+n*math.cos (t), y:e.y+n* Math.sin (t)}}function Createparticule (e,t) {var a={};return a.x=e,a.y=t,a.color=colors[anime.random (0, colors.length-1)],a.radius=anime.random (16,32), A.endpos=setparticuledirection (a), a.draw=function () { Ctx.beginpath (), Ctx.arc (a.x,a.y,a.radius,0,2*math.pi,!0), Ctx.fillstyle=a.color,ctx.fill ()},a}function Createcircle (e,t) {var a={};return a.x=e,a.y=t,a.color= "#F00", a.radius=0.1,a.alpha=0.5,a.linewidth=6,a.draw= function () {Ctx.globalalpha=a.alpha,ctx.beginpath (), Ctx.arc (a.x,a.y,a.radius,0,2*math.pi,!0), ctx.lineWidth= A.linewidth,ctx.strokestyle=a.color,ctx.stroke (), Ctx.globalalpha=1},a}function RenderParticule (e) {for (Var t=0;t <e.animatables. length;t++) {E.animatables[t].target.draw ()}}function animateparticules (e,t) {for (Var a=createcircle (e,t), n=[],i= 0;i<numberofparticules;i++) {N.push (Createparticule (e,t))}anime.timeline (). Add ({targets:n,x:function (e) { Return E.endpos.x},y:function (e) {return e.endpos.y},radius:0.1,duration:anime.random (1200,1800), easing: " Easeoutexpo ", Update:renderparticule}). Add ({targets:a,radius:anime.random (80,160), linewidth:0,alpha:{value:0, Easing: "Linear", Duration:anime.random (600,800)},duration:anime.random (1200,1800), easing: "Easeoutexpo", Update: renderparticule,offset:0})}function debounce (e,t) {var a;return function () {var n=this,i=arguments;cleartimeout (a), a =settimeout (function () {e.apply (n,i)},t)}}var canvasel=document.queryselector (". Fireworks"); if (Canvasel) {var ctx= Canvasel.getcontext ("2d"), numberofparticules=30,pointerx=0,pointery=0,tap= "MouseDown", colors=["#FF1461", "# 18ff92 "," #5A87FF "," #FBF38C "],setcanvassize=debounce (function () {canvasel.width=2*window.innerwidth, Canvasel.height=2*window.innerheight,canvasel.style.width=window.innerwidth+ "px", canvasel.style.height=window.innerheight+ "px", Canvasel.getcontext ("2d"). Scale (2,2)},500), Render=anime ({duration:1/0,update:function () {Ctx.clearrect (0,0, Canvasel.width,canvasel.height)});d Ocument.addeventlistener (Tap,function (e) {"sidebar"!==e.target.id&& "Toggle-sidebar"!==e.target.id&& "A"!==e.target.nodename&& "IMG"!==e.target.nodename&& ( Render.play (), Updatecoords (E), Animateparticules (pointerx,pointery))},!1), Setcanvassize (), Window.addeventlistener ("resize", Setcanvassize,!1)} "use strict"; function Updatecoords (e) {pointerx= (e.clientx| | E.TOUCHES[0].CLIENTX)-canvasel.getboundingclientrect (). left,pointery=e.clienty| | E.touches[0].clienty-canvasel.getboundingclientrect (). Top}function setparticuledirection (e) {var t=anime.random ( 0,360) *math.pi/180,a=anime.random (50,180), N=[-1,1][anime.random (0,1)]*a;return{x:e.x+n*math.cos (t), y:e.y+n* Math.sin (t)}}function Createparticule (e,t) {var a={};return a.x=e,a.y=t,a.color=colOrs[anime.random (0,colors.length-1)],a.radius=anime.random (16,32), A.endpos=setparticuledirection (a), a.draw= function () {Ctx.beginpath (), Ctx.arc (a.x,a.y,a.radius,0,2*math.pi,!0), Ctx.fillstyle=a.color,ctx.fill ()},a} function Createcircle (e,t) {var a={};return a.x=e,a.y=t,a.color= "#F00", a.radius=0.1,a.alpha=0.5,a.linewidth=6, A.draw=function () {Ctx.globalalpha=a.alpha,ctx.beginpath (), Ctx.arc (a.x,a.y,a.radius,0,2*math.pi,!0), Ctx.linewidth=a.linewidth,ctx.strokestyle=a.color,ctx.stroke (), Ctx.globalalpha=1},a}function RenderParticule (E) {for (Var t=0;t<e.animatables.length;t++) {E.animatables[t].target.draw ()}}function animateparticules (e,t) { var a=createcircle (e,t), n=[],i=0;i<numberofparticules;i++) {N.push (Createparticule (e,t))}anime.timeline (). Add ({targets:n,x:function (e) {return e.endpos.x},y:function (e) {return e.endpos.y},radius:0.1,duration:anime.random ( 1200,1800), easing: "Easeoutexpo", Update:renderparticule}). Add ({targets:a,radius:anime.random (80,160), lineWidth : 0,alpha:{value:0,easing: "LInear ", Duration:anime.random (600,800)},duration:anime.random (1200,1800), easing:" Easeoutexpo ", Update: renderparticule,offset:0})}function debounce (e,t) {var a;return function () {var n=this,i=arguments;cleartimeout (a), a =settimeout (function () {e.apply (n,i)},t)}}var canvasel=document.queryselector (". Fireworks"); if (Canvasel) {var ctx= Canvasel.getcontext ("2d"), numberofparticules=30,pointerx=0,pointery=0,tap= "MouseDown", colors=["#FF1461", "# 18ff92 "," #5A87FF "," #FBF38C "],setcanvassize=debounce (function () {canvasel.width=2*window.innerwidth, canvasel.height=2*window.innerheight,canvasel.style.width=window.innerwidth+ "px", canvasEl.style.height= window.innerheight+ "px", Canvasel.getcontext ("2d"). Scale (2,2)},500), Render=anime ({duration:1/0,update:function ( {Ctx.clearrect (0,0,canvasel.width,canvasel.height)});d Ocument.addeventlistener (Tap,function (e) {"sidebar"!== e.target.id&& "Toggle-sidebar"!==e.target.id&& "A"!==e.target.nodename&& "IMG"!== e.target.nodename&& (Render.play (), UPDATecoords (e), Animateparticules (pointerx,pointery))},!1), Setcanvassize (), Window.addeventlistener ("Resize", setcanvassize,!1)};?

  

Write in/layout/layout.ejs:

{% if Theme.fireworks%}   <canvas class= "Fireworks" style= "position:fixed;left:0;top:0;z-index:1; Pointer-events:none, "></canvas>    <script type=" Text/javascript "src="//cdn.bootcss.com/animejs/ 2.2.0/anime.min.js "></script>    <script type=" Text/javascript "src="/js/src/fireworks.js "></ script>{% endif%}

  

       
?
?

Then, add the config file in the corresponding topic

Fireworks:true

  

9. Set Comment function Gitment

Owner GitHub user name, repo store Comment warehouse, ClientID and Clientsecret need to register their GitHub app

Https://github.com/settings/applications

Remember authorization callback URL to fill in the CNAME resolution domain name (not resolved to fill in the default GitHub domain name), otherwise may not be able to use

Then sadly found the author service stopped, refer to https://www.jianshu.com/p/f2f4c802914b

10. Add a Comment service discus

Unable to register, no domestic access issues such as:

Multiple git accounts and Hexo build blog Advanced

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.