站点地图

This commit is contained in:
结发受长生 2018-06-27 13:49:59 +08:00
parent 478d0212b9
commit cb20865b09
5 changed files with 69 additions and 13 deletions

View File

@ -79,12 +79,10 @@ pagination_dir: page
## Themes: https://hexo.io/themes/
theme: yilia
#----------------------------
# 搜索
#----------------------------
# search:
# path: search.xml
# field: all
### 站点地图
sitemap:
path: sitemap.xml
template: ./sitemap_template.xml
# Deployment
## Docs: https://hexo.io/docs/deployment.html

46
package-lock.json generated
View File

@ -1471,6 +1471,52 @@
}
}
},
"hexo-generator-sitemap": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/hexo-generator-sitemap/-/hexo-generator-sitemap-1.2.0.tgz",
"integrity": "sha1-MBj419Hi5Cs/caZacxb/z1g7w/M=",
"requires": {
"minimatch": "3.0.4",
"nunjucks": "2.5.2",
"object-assign": "4.1.1"
},
"dependencies": {
"camelcase": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz",
"integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8="
},
"nunjucks": {
"version": "2.5.2",
"resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-2.5.2.tgz",
"integrity": "sha1-6n00bnhbikh0Zmw8yp4YxXf7oiw=",
"requires": {
"asap": "2.0.6",
"chokidar": "1.7.0",
"yargs": "3.32.0"
}
},
"window-size": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz",
"integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY="
},
"yargs": {
"version": "3.32.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz",
"integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=",
"requires": {
"camelcase": "2.1.1",
"cliui": "3.2.0",
"decamelize": "1.2.0",
"os-locale": "1.4.0",
"string-width": "1.0.2",
"window-size": "0.1.4",
"y18n": "3.2.1"
}
}
}
},
"hexo-generator-tag": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/hexo-generator-tag/-/hexo-generator-tag-0.2.0.tgz",

View File

@ -12,6 +12,7 @@
"hexo-generator-feed": "^1.2.2",
"hexo-generator-index": "^0.2.0",
"hexo-generator-json-content": "^3.0.1",
"hexo-generator-sitemap": "^1.2.0",
"hexo-generator-tag": "^0.2.0",
"hexo-renderer-ejs": "^0.3.0",
"hexo-renderer-marked": "^0.3.0",

13
sitemap_template.xml Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for post in posts %}
<url>
<loc>{{ post.permalink | uriencode }}</loc>
{% if post.updated %}
<lastmod>{{ post.updated.toISOString() }}</lastmod>
{% elif post.date %}
<lastmod>{{ post.date.toISOString() }}</lastmod>
{% endif %}
</url>
{% endfor %}
</urlset>

View File

@ -1,6 +1,6 @@
---
title: 3.4、Docker(4)-nginx
date: 2018-2-10 22:38:32
date: 2018-6-27 11:35:27
tags:
- docker
- nginx
@ -32,7 +32,9 @@ docker run \
-p 8080:80
```
+ volume是本地目录与容器内目录的映射, 前面是本地目录, 后面是容器内目录
也可以使用`mount`参数, 写作 **--mount source=/test/html,target=/usr/share/nginx/html**
也可以使用`mount`参数
写作 **--mount type=bind,source=/test/html,target=/usr/share/nginx/html**
(如果加上readonly, 则在容器内无法对该目录进行写入操作)
+ 目录映射的信息可以通过`docker inspect [ContainerId]`来查看
```json
"Mounts": [{
@ -124,12 +126,8 @@ docker run \
然后就可以尝试访问 https://localhost:8443/ 了
当然自己生成的证书浏览器是不信任的, 添加例外即可
### HTTP/2
先背诵教科书, HTTP/2的新特性
### HTTP/2新特性
1. 二进制分帧 : HTTP/2 采用二进制格式传输数据,而非 HTTP 1.x 的文本格式,二进制协议解析起来更高效
2. 多路复用 : 所有的请求都是通过一个TCP连接并发完成, HTTP 1.x中如果想并发多个请求必须使用多个TCP链接
3. 服务器推送 : 服务端可以在发送页面HTML时主动推送其它资源而不用等到浏览器解析到相应位置发起请求再响应
4. 头部压缩 : 对消息头采用HPACK专为http/2头部设计的压缩格式进行压缩传输能够节省消息头占用的网络的流量
上面的配置当中, 已经启用了http2( 向下兼容, 不用担心低版本浏览器问题 )
但是服务器推送并没有实现