This is a plugin for automatically adding timestamp and copyright terms at the top and the bottom of every article. For now, it is using body font and you can specify the color, copyright owner and author of each article.
Feel free to create issues or pull request for any discussion.
{% set author = "Hao" %}
# Title of the Article
content
.
.
last modified by Hao, 2016/05/05 05:05:05
content
Copyright © 2016 Hao.
.
.
.
All rights reserved.
"plugins": ["signature"]
"pluginsConfig": {
"gitbook-plugin-signature":{
"autoTimeStamp":{
"color":"gray",
"timeStampFormat": "YYYY/MM/DD HH:mm:ss"
},
"autoCopyright":{
"color":"gray",
"owner":"Hao",
"center":true
},
"signature":{
"key": "customized signature"
}
}
}
If you don't want to automatically add timestamp or copyright, simply drop the part in pluginsConfig
.
Default author of each article will be set to the last git commiter of the file.
"pluginsConfig": {
"gitbook-plugin-signature":{
"autoTimeStamp":{
"color":"gray",
"timeStampFormat": "YYYY/MM/DD HH:mm:ss"
}
}
}
You can also set author of article manually.
{% set author = "Hao" %}
# Title of the Article
content
.
.
"pluginsConfig": {
"gitbook-plugin-signature":{
"autoCopyright":{
"color":"gray",
"owner":"Hao",
"center":true
}
}
}
autoCoyright.author
will be set to book.author
if no specified.
You can set your customized signature content in book.json
and use it in .md
files.
"pluginsConfig": {
"gitbook-plugin-signature":{
"signature":{
"key": "customized signature"
}
}
}
{{'key'|signature}}
or the simplified version
{{'key'|s}}
gitbook-plugin-signature is freely distributable under the terms of the MIT license.