微信小程序群发功能代码实现详细分析
1031
2022-11-04
Wodle一个使用新Web开发框架和工具实现静态站点生成器
Wodle
Wodle is a static site generator using new frameworks and tools for modern web development. It's built on top of Next.js and Tachyons. And you can easily turn the generated static site into a fully dynamic website.
Why?
Because NextJS and functional CSS make super easy to get started with a blog or a static page so it's a good starting point for bloggers and dev that wants to learn those technologies.
Installation
You can install Wodle via npm:
npm install -g wodle
Getting started
Once Wodle is installed, you can use the wodle command. To build a new site you can run:
wodle myBlog
That will generate a new site called myBlog on the same directory where you ran the command
To get started with your new site you just need to cd into it and then install the dependencies:
cd myBlogyarn
That will fetch all the dependencies, once that's ready you can start a server running:
yarn dev
And go to localhost:3000/, you should see a site like this one:
That server will listen to changes on your app and reload the browser.
If you want to run your site without the hot-reloading you can run:
yarn start
Build your site
To build your site you can run:
yarn build
which will generate an out/ folder with your static site ready to be published.
How it works?
Your site will have different folders:
Pages Folder
This folder contains your pages files and their names matches their routes, so if you want to add a new page on /new-page you will need to add a new component on this folder called new-page.js. For advanced routing check here.
The scaffold comes with some page components prebuilt on the components folder.
Components Folder
In this folder you will find all the pre-built components on the site, the core components of this scaffold app are:
SideBar
A sidebar component that gets items and renders a Nav with their NavItems, the content for this component it's on content/sideBarOptions.js
Main
This components just wraps whatever you want to display on the main section (the center of the site).
MainArticle
This component renders the main Article, as you see on the index and each particular article. A demo of the content that can be processed by this component it's on content/mainArticle.
ArticleList
This component renders a list of articles as you will see on each individual page from the sidebar menu, you can see the lists on content/ on the
among others
Styles Folder
Your styles folder is for all your css (right now almost empty thanks to functional CSS and Tachyons)
Extending the Site
You can continue deleting pages (removing files from the pages folder) adding more pages, articles, options following the patterns on the scaffold or just change everything as you want! You can read great guides on Next.js site and Tachyons to make your awesome website or blog!
based on previous art chibicode.com and jspg
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。