{"componentChunkName":"component---src-templates-best-practice-detail-tsx","path":"/best-practice/2020-01-13-Wintersmith-with-serverless","result":{"data":{"currentBlog":{"id":"1e3cc3dc-4176-54ac-99bf-c9f2d7edd372","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020113/1578918119146-WINTERS.png","authors":["Tabor"],"categories":["best-practice"],"date":"2020-01-13T00:00:00.000Z","title":"使用 Wintersmith + Serverless Framework 快速创建个人站点","description":"通过 Serverless Website 组件快速构建一个 Serverless Wintersmith 个人站点。","authorslink":["https://canmeng.net"],"translators":null,"translatorslink":null,"tags":["Serverless","Wintersmith"],"keywords":"Wintersmith,Wintersmith 站点,Serverless Framework 快速创建个人站点","outdated":true},"wordCount":{"words":118,"sentences":30,"paragraphs":30},"fileAbsolutePath":"/opt/build/repo/content/best-practice/2020-01-13-Wintersmith-with-serverless.md","fields":{"slug":"/best-practice/2020-01-13-Wintersmith-with-serverless/","keywords":["serverless","website","无服务器","serverless","Serverless","yml","wintersmith","Framework","部署","tencent"]},"html":"<p>首先我们来介绍下，Wintersmith 是一个简单而灵活的静态站点生成器。采用 markdown 构建，这个是我们的基础条件。</p>\n<ul>\n<li><a href=\"https://github.com/serverless/serverless/blob/master/README_CN.md\">Serverless Framework</a>：在 GitHub 上有三万颗星，业界非常受欢迎的无服务器应用框架，开发者无需关心底层资源即可部署完整可用的 Serverless 应用架构。</li>\n</ul>\n<p>确保系统包含以下环境：</p>\n<ul>\n<li>Node.js (Node.js 版本需不低于 8.6，建议使用 10.0 及以上版本)</li>\n</ul>\n<p>这边有详细的视频演示大家也可以直接观看：</p>\n<video id=\"video\" controls=\"\" preload=\"none\" poster=\"https://img.serverlesscloud.cn/2020113/1578918119146-WINTERS.png\">\n<source id=\"mp4\" src=\"https://serverlessimg-1253970226.cos.ap-chengdu.myqcloud.com/video/win.mp4\">\n</video>\n<h2 id=\"1-安装-serverless-framework\"><a href=\"#1-%E5%AE%89%E8%A3%85-serverless-framework\" aria-label=\"1 安装 serverless framework permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>1. 安装 Serverless Framework</h2>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"90244300828803500000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`\\$ npm install -g serverless`, `90244300828803500000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\">$ npm install <span class=\"token operator\">-</span>g serverless</code></pre></div>\n<h2 id=\"2-安装-wintersmith\"><a href=\"#2-%E5%AE%89%E8%A3%85-wintersmith\" aria-label=\"2 安装 wintersmith permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>2. 安装 wintersmith</h2>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"80279308127783960000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`\\$ npm i wintersmith -g`, `80279308127783960000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\">$ npm i wintersmith <span class=\"token operator\">-</span>g</code></pre></div>\n<h2 id=\"3-新建-wintersmith-项目\"><a href=\"#3-%E6%96%B0%E5%BB%BA-wintersmith-%E9%A1%B9%E7%9B%AE\" aria-label=\"3 新建 wintersmith 项目 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>3. 新建 wintersmith 项目</h2>\n<p>可对指定路径进行安装</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"38692038636116660000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`\\$ wintersmith new <path>`, `38692038636116660000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\">$ wintersmith <span class=\"token keyword\">new</span> <span class=\"token operator\">&lt;</span>path<span class=\"token operator\">></span></code></pre></div>\n<p>初始化成功后，可以看到路径下创建的项目文件</p>\n<h2 id=\"4-本地预览\"><a href=\"#4-%E6%9C%AC%E5%9C%B0%E9%A2%84%E8%A7%88\" aria-label=\"4 本地预览 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>4. 本地预览</h2>\n<p>运行以下命令，并通过浏览器访问 <a href=\"http://localhost:8080\">http://localhost:8080</a> 即可方便地预览效果，而且提供 LiveReload 功能，可以实时预览。</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"93443922924318720000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`\\$ wintersmith preview`, `93443922924318720000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\">$ wintersmith preview</code></pre></div>\n<p>使用如下命令构建网站：</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"43759752639040790000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`\\$ wintersmith build`, `43759752639040790000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\">$ wintersmith build</code></pre></div>\n<h2 id=\"5-配置-yml-文件\"><a href=\"#5-%E9%85%8D%E7%BD%AE-yml-%E6%96%87%E4%BB%B6\" aria-label=\"5 配置 yml 文件 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>5. 配置 yml 文件</h2>\n<p>在项目目录下，创建 serverless.yml 文件：</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"2360683444116307000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`\\$ touch serverless.yml`, `2360683444116307000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\">$ touch serverless<span class=\"token punctuation\">.</span>yml</code></pre></div>\n<p>将以下内容写入上述的 yml 文件里：</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"67029093307014590000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`# serverless.yml\n\nmyWebsite:\n component: '@serverless/tencent-website'\n inputs:\n code:\n src: ./build\n index: index.html\n error: index.html\n region: ap-guangzhou\n bucketName: my-bucket`, `67029093307014590000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\"># serverless<span class=\"token punctuation\">.</span>yml\n\nmyWebsite<span class=\"token punctuation\">:</span>\n component<span class=\"token punctuation\">:</span> <span class=\"token string\">'@serverless/tencent-website'</span>\n inputs<span class=\"token punctuation\">:</span>\n code<span class=\"token punctuation\">:</span>\n src<span class=\"token punctuation\">:</span> <span class=\"token punctuation\">.</span><span class=\"token operator\">/</span>build\n index<span class=\"token punctuation\">:</span> index<span class=\"token punctuation\">.</span>html\n error<span class=\"token punctuation\">:</span> index<span class=\"token punctuation\">.</span>html\n region<span class=\"token punctuation\">:</span> ap<span class=\"token operator\">-</span>guangzhou\n bucketName<span class=\"token punctuation\">:</span> my<span class=\"token operator\">-</span>bucket</code></pre></div>\n<p>配置完成后，文件目录如下：</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"54530678633169210000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`.\n├── build\n| ├── index.html\n| └── README.md\n└── serverless.yml`, `54530678633169210000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\"><span class=\"token punctuation\">.</span>\n├── build\n<span class=\"token operator\">|</span> ├── index<span class=\"token punctuation\">.</span>html\n<span class=\"token operator\">|</span> └── <span class=\"token constant\">README</span><span class=\"token punctuation\">.</span>md\n└── serverless<span class=\"token punctuation\">.</span>yml</code></pre></div>\n<h2 id=\"6-部署\"><a href=\"#6-%E9%83%A8%E7%BD%B2\" aria-label=\"6 部署 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>6. 部署</h2>\n<p>通过 <code class=\"language-text\">sls</code> 命令进行部署，这里还可以添加 <code class=\"language-text\">–debug</code> 参数来查看部署过程中的信息：</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"55235855727926440000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"代码复制成功\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`\\$ sls --debug`, `55235855727926440000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                复制代码<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\">$ sls <span class=\"token operator\">--</span>debug</code></pre></div>\n<p>如您的账号未<a href=\"https://cloud.tencent.com/login\">登陆</a>或<a href=\"https://cloud.tencent.com/register\">注册</a>腾讯云，您可以直接通过微信扫描命令行中的二维码进行授权登陆和注册，从而进行授权登陆和注册。这也是我觉得特别方便的一个地方！</p>\n<p>部署过程中，terminal 显示信息示意：</p>\n<p>访问命令行输出的 url，即可查看使用 Serverless Framework 部署的网站啦~</p>\n<h2 id=\"7-小结\"><a href=\"#7-%E5%B0%8F%E7%BB%93\" aria-label=\"7 小结 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>7. 小结</h2>\n<p>本文使用了腾讯云的无服务器框架 <a href=\"https://cloud.tencent.com/product/sf\">Serverless Framework</a> 来搭建  Wintersmith 博客系统。</p>\n<p>虽然这只是一个非常简单的示例，但是不难看出，Serverless Framework 在快速部署方面的强大能力。比如集成了微信扫描二维码，就直接让我们避开了繁琐的云服务的账号注册、配置的环节。而你需要做的，只是根据 Wintersmith 自身的能力，进行网站的定制。</p>\n<hr>\n<div id='scf-deploy-iframe-or-md'></div>\n<hr>\n<blockquote>\n<p><strong>传送门：</strong></p>\n<ul>\n<li>GitHub: <a href=\"https://github.com/serverless/serverless/blob/master/README_CN.md\">github.com/serverless</a></li>\n<li>官网：<a href=\"https://serverless.com/\">serverless.com</a></li>\n</ul>\n</blockquote>\n<p>欢迎访问：<a href=\"https://serverlesscloud.cn/\">Serverless 中文网</a>，您可以在 <a href=\"https://serverlesscloud.cn/best-practice\">最佳实践</a> 里体验更多关于 Serverless 应用的开发！</p>","tableOfContents":"<ul>\n<li><a href=\"/best-practice/2020-01-13-Wintersmith-with-serverless/#1-%E5%AE%89%E8%A3%85-serverless-framework\">1. 安装 Serverless Framework</a></li>\n<li><a href=\"/best-practice/2020-01-13-Wintersmith-with-serverless/#2-%E5%AE%89%E8%A3%85-wintersmith\">2. 安装 wintersmith</a></li>\n<li><a href=\"/best-practice/2020-01-13-Wintersmith-with-serverless/#3-%E6%96%B0%E5%BB%BA-wintersmith-%E9%A1%B9%E7%9B%AE\">3. 新建 wintersmith 项目</a></li>\n<li><a href=\"/best-practice/2020-01-13-Wintersmith-with-serverless/#4-%E6%9C%AC%E5%9C%B0%E9%A2%84%E8%A7%88\">4. 本地预览</a></li>\n<li><a href=\"/best-practice/2020-01-13-Wintersmith-with-serverless/#5-%E9%85%8D%E7%BD%AE-yml-%E6%96%87%E4%BB%B6\">5. 配置 yml 文件</a></li>\n<li><a href=\"/best-practice/2020-01-13-Wintersmith-with-serverless/#6-%E9%83%A8%E7%BD%B2\">6. 部署</a></li>\n<li><a href=\"/best-practice/2020-01-13-Wintersmith-with-serverless/#7-%E5%B0%8F%E7%BB%93\">7. 小结</a></li>\n</ul>"},"previousBlog":{"id":"d28c5060-2591-5220-b940-e0f73d022e76","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/2020219/1582115734254-VuePress_2_%E9%95%BF%E5%89%AF%E6%9C%AC.png","authors":["Aceyclee"],"categories":["best-practice"],"date":"2020-02-04T00:00:00.000Z","title":"基于 Serverless 的 VuePress 极简静态网站","description":"通过 Serverless Website 组件快速构建一个 VuePress 极简静态网站","authorslink":["https://www.zhihu.com/people/Aceyclee"],"translators":null,"translatorslink":null,"tags":["Serverless","VuePress"],"keywords":"VuePress,静态网站管理系统,VuePress 极简静态网站","outdated":true},"wordCount":{"words":150,"sentences":32,"paragraphs":31},"fileAbsolutePath":"/opt/build/repo/content/best-practice/2020-02-04-vuepress-serverless.md","fields":{"slug":"/best-practice/2020-02-04-vuepress-serverless/","keywords":["nodejs","serverless","vue","vuejs","website","单页应用","无服务器","serverless","vuepress","Serverless","yml","VuePress","部署"]}},"nextBlog":{"id":"4f8cc7f1-71e2-5cac-a5fe-1bfa55e4b012","frontmatter":{"thumbnail":"https://img.serverlesscloud.cn/20191226/1577353083364-laravel.png","authors":["Tabor"],"categories":["best-practice"],"date":"2020-01-13T00:00:00.000Z","title":"Laravel + Serverless Framework 快速创建 CMS 内容管理系统","description":"通过 Serverless Laravel 组件快速构建一个 Serverless CMS 内容管理系统","authorslink":["https://canmeng.net"],"translators":null,"translatorslink":null,"tags":["Wintersmith","Laravel"],"keywords":"Serverless Laravel,CMS 内容管理系统,构建Serverless CMS内容管理系统","outdated":true},"wordCount":{"words":154,"sentences":38,"paragraphs":38},"fileAbsolutePath":"/opt/build/repo/content/best-practice/2020-01-13-LARAVEL-with-serverless.md","fields":{"slug":"/best-practice/2020-01-13-LARAVEL-with-serverless/","keywords":["php","serverless","云函数","composer","serverless","php","Laravel","Serverless","phar"]}}},"pageContext":{"isCreatedByStatefulCreatePages":false,"blogId":"1e3cc3dc-4176-54ac-99bf-c9f2d7edd372","previousBlogId":"d28c5060-2591-5220-b940-e0f73d022e76","nextBlogId":"4f8cc7f1-71e2-5cac-a5fe-1bfa55e4b012"}}}