In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces you Docsify + Serverless Framework how to quickly create a personal blog system, the content is very detailed, interested friends can refer to, hope to be helpful to you.
Create a blog system with docsify, then deploy the service with Serverless Framework, and it will be done in three minutes!
A brief introduction:
Docsify: a magical document website generation tool, unlike GitBook, Hexo, it does not generate .md to .html files, all the conversion work is done at run time. And if you just need to quickly build a small documentation site, or do not want to generate a pile of .html files to "pollute" commit records, just create an index.html to start writing documents
Serverless Framework: with 30, 000 stars on GitHub, it is a very popular serverless application framework in the industry. Developers can deploy a fully available Serverless application architecture without paying attention to the underlying resources.
Next we will do this in three steps: install and initialize the → configuration yml file → deployment
▎ installation and initialization
First, make sure that the system contains the following environments:
Node.js (Node.js version should be no less than 8.6, version 10.0 or above is recommended)
Git
1. Install Serverless Framework
$npm install-g serverless
two。 Install docsify
$npm I docsify-cli-g
3. Initialize the project
$docsify init docsify
After successful initialization, you can see several files created in the. / docsify directory
Index.html entry file
README.md will render as the home page content.
You can update the content of the site by editing docsify/README.md directly, and of course you can write multiple pages, which is later.
4. Local preview
Run the following command and visit http://localhost:3000 through the browser to easily preview the effect, and provide LiveReload function, you can preview in real time.
$docsify serve docsify ▎ configuration yml file
Under the project directory, create the serverless.yml file:
$touch serverless.yml
Write the following to the yml file above:
# serverless.ymlmydocsify: component: "@ serverless/tencent-website" inputs: code: src:. / docsify # Upload static files generated by docsify index: index.html error: index.html region: ap-guangzhou bucketName: my-bucket
After the configuration is complete, the file directory is as follows:
.├── docsify | ├── index.html | └── README.md └── serverless.yml ▎ deployment
Deploy through the sls command, and you can also add the-- debug parameter to view the information during the deployment process.
$sls-debug
If your account is not logged in or registered with Tencent Cloud, you can log in and register by scanning the QR code on the command line directly through Wechat. This is also a place that I think is very convenient!
During deployment, the terminal displays information to indicate:
Visit the url output from the command line to view the docsify documentation website deployed using Serverless Framework ~
About Docsify + Serverless Framework how to quickly create a personal blog system to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.