Skip to content

Commit

Permalink
feat: add params
Browse files Browse the repository at this point in the history
  • Loading branch information
gaowei-space committed May 20, 2023
1 parent 9508e9e commit 11c8096
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 19 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ docker run -dit --rm --name=markdown-blog \
- --env value, -e value 运行环境, 可选:dev,test,prod,默认:"prod"
- --index value, -i value 设置默认首页的文件名称, 默认为空
- --cache value, -c value 设置页面缓存时间,单位分钟,默认3分钟
- --icp value ICP备案号, 默认为空
- --copyright value 版权年份,默认当前年份,如:2023,在配置了ICP后才有效
- --fdir value markdown目录下的静态资源目录名称,比如图片等,默认"public"
- --analyzer-baidu value 设置百度分析统计器
- --analyzer-google value 设置谷歌分析统计器
- --gitalk.client-id value 设置 Gitalk ClientId, 默认为空
Expand Down
39 changes: 21 additions & 18 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,24 +144,27 @@ docker run -dit --rm --name=markdown-blog \
- h to view the version
- web to run the blog service
- markdown-blog web
- -config FILE Load configuration file, default is empty
- -dir value, -d value Specify the markdown folder, default: . /md/
- -title value, -t value web service title, default: "Blog"
- -port value, -p value web service port, default: 5006
- -env value, -e value runtime environment, optional: dev,test,prod, default: "prod"
- -index value, -i value Set the default home page file name, default is empty
- -cache value, -c value Set the page cache time, in minutes, default is 3 minutes
- -analyzer-baidu value Set Baidu analyzer statistics
- -analyzer-google value Set Google analyzer statistics
- -gitalk.client-id value Set Gitalk ClientId, default is null
- -gitalk.client-secret value Set Gitalk ClientSecret, default is null
- -gitalk.repo value Set Gitalk Repo, default is null
- -gitalk.owner value Set Gitalk Owner, default is null
- -gitalk.admin set Gitalk Admin, default is array [gitalk.owner]
- -gitalk.labels set Gitalk Admin, default is array ["gitalk"].
- -ignore-file value Set ignore file, eg: demo.md
- -ignore-path value Set ignore folders, eg: demo
-h View version
- -config FILE Load configuration file, default is empty
- -dir value, -d value Specify the markdown folder, default: . /md/
- -title value, -t value Web service title, default: "Blog"
- -port value, -p value Web service port, default: 5006
- -env value, -e value Runtime environment, optional: dev,test,prod, default: "prod"
- -index value, -i value Set the default home page file name, default is empty
- -cache value, -c value Set the page cache time, in minutes, default is 3 minutes
- --icp value ICP record number, default is empty
- --copyright value Copyright year, default current year, such as: 2023
- --fdir value The name of the static resource directory under the markdown directory, such as pictures, etc., the default is "public"
- -analyzer-baidu value Set Baidu analyzer statistics
- -analyzer-google value Set Google analyzer statistics
- -gitalk.client-id value Set Gitalk ClientId, default is null
- -gitalk.client-secret value Set Gitalk ClientSecret, default is null
- -gitalk.repo value Set Gitalk Repo, default is null
- -gitalk.owner value Set Gitalk Owner, default is null
- -gitalk.admin value Set Gitalk Admin, default is array [gitalk.owner]
- -gitalk.labels value Set Gitalk Admin, default is array ["gitalk"].
- -ignore-file value Set ignore file, eg: demo.md
- -ignore-path value Set ignore folders, eg: demo
- -h Help

### Run parameters
> Support reading configuration items from configuration file, but specify parameters to take precedence over configuration file at runtime, refer to `config/config.yml.tmp` for configuration content
Expand Down
4 changes: 3 additions & 1 deletion web/views/layouts/footer.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ if .ICP }}
<div class="footer">
<p>© Copyright {{.Copyright}} <a class="link" href="https://beian.miit.gov.cn">{{.ICP}}</a></p>
</div>
</div>
{{ end }}

0 comments on commit 11c8096

Please sign in to comment.