本质上就是你本地的客户端访问需要一个私钥。所以无论是用邮箱生成的key(github的那种方式)还是 ssh-keygen 命令生成的都是有效的。 cat ~/.ssh/id_rsa copy 出之后再新建一个文件,没有后缀(也就是文件格式),将copy出来的私钥复制进去,之后xshell登陆时选择用户秘钥,将这个文件选中即可。
配置ssh-key这种东西,真心不想记住,干脆自己整一份,供日后参考。 git config –global user.name “yourname” git config –global user.email “yourname@gmail.com” ssh-keygen -t rsa -C “yourname@gmail.com” cat ~/.ssh/id_rsa.pub
(function(f) { console.log(‘1’) })(function() { console.log(‘2’); return (function() { console.log(‘3’) return function(aa) { console.log(aa) } })({1:111},{},[8])(8) }) 1、delete 只会删除对象自身的属性,而不会顺着原型链向上查找删除
cd /usr/local/src wget http://sphinxsearch.com/files/sphinx-2.1.2-release.tar.gz tar -xzvf sphinx-2.1.2-release.tar.gz cd sphinx-2.1.2-release ./configure –prefix=/usr/local/sphinx –with-mysql –with-static-mysql make make install # 添加到环境变量 echo export PATH=$PATH:/usr/local/sphinx/bin/ >> /etc/profile source /etc/profile
document.getElementById(); //定义在HTMLDocument类中,而不在Document类中,所以只能使用在HTML文档中,XML文档不适用 //id名相同的也会被选入 document.getElementsByName(); document.getElementsByTagName(); //正常区分大小写,怪异模式下不区分 document.getElementsByClassName(); document.querySelector(); document.querySelectorAll();
sitemap 是指 XML格式的网站地图 而Sitemap则是指HTML版的站点地图 分类页面的标题要采用 分类名称 – 网站名称 诸如此类的 url静态化/伪静态,可以使用wp的插件来生成纯html格式的静态文件 手工或者程序生成 meta标签 keyword 和 description 文章开头可以有总结概述的小段文字,其中可以包含关键字 合理使用H1-H6的标题 定制化404错误页面,但正确返回404 code ,可以适当的展示网站的其他文章 定期检查死链 标题title长度控制在 20个中文字符(baidu),65个英文字符(google) 图片ALT属性
1.1什么是SEO SEO 的英文 Search Engine Optimization 中文 “搜索引擎优化”。目的则是通过合理的方式来使目标网站在搜索引擎的结果中获得更高的排名,从而获得更多流量 1.2 网站结构优化 作为一个前端,网页的结构不光要符合编码标准,还要有良好的标识,让搜索引擎更好的去识别。 url能被爬虫所抓取,并且可读,通过链接爬向更深的页面 添加robots.txt User-Agent: * Allow: /wp-content/uploads/ Disallow: /wp-content/plugins/ Disallow: /readme.html Disallow: /refer/ Sitemap: http://www.chemin.me/post-sitemap.xml 1.3shenmehsd
去除菜单输出div ul ,下面这段代码需要设置菜单并且菜单位置为primary才可以,否则将依旧输出div 和ul <?php wp_nav_menu( array( ‘theme_location’ => ‘primary’, ‘container’ => ”, ‘items_wrap’ => ‘%3$s’, ‘depth’ => 0, ) ); ?>