Lektor插件,用Netlify发布您的站点。
lektor-netlif的Python项目详细描述
Lektor Netlify发布者插件
安装
根据the instructions on netlify.com安装netlify
命令行程序。
从命令行将lektor netlify添加到项目中:
lektor plugins add lektor-netlify
见the Lektor documentation for more instructions on installing plugins。
配置
在.lektorproject
文件中配置服务器:
[servers.production]name=Productiontarget=netlify://my-domain.com
访问令牌
从Netlify的“应用程序”页面获取个人访问令牌:
每次发布时都必须使用此访问令牌。如果您的项目文件是私有的您可以将令牌保存在那里。别这么做!
[servers.production]name=Productiontarget=netlify://my-domain.comkey=ACCESS_TOKEN
现在像这样部署您的站点:
lektor deploy production
否则,请在命令行上传递令牌:
lektor deploy production --key ACCESS_TOKEN