简体   繁体   English

具有Yeoman generator-webapp功能的静态站点生成器

[英]Static site generator with Yeoman generator-webapp capabilities

All the static site generators (SSGs) I have tried still feel like a downgrade compared to the frontend development workflows I have with eg generator-webapp or generator-gulp-angular . 与我使用generator-webappgenerator-gulp-angular进行的前端开发工作流相比,我尝试过的所有静态站点生成器(SSG)仍然感觉像是降级了。 Do you know of a SSG that besides for the usual features: 您是否知道除常规功能外的SSG

  • write posts in Markdown 在Markdown中写帖子
  • style the theme layout in some template language (eg EJS) 用某种模板语言(例如EJS)设置主题布局的样式

also offers the level of usability as the Yeoman generators like generator-webapp provide? 还可以提供类似Yeoman生成器(如generator-webapp)提供的可用性级别吗? Some features generator-webapp includes are: generator-webapp的一些功能包括:

  • CSS Autoprefixing CSS自动前缀
  • Built-in preview server with BrowserSync 带有BrowserSync的内置预览服务器
  • Automagically compile Sass with libsass 用libsass自动编译Sass
  • Automagically lint your scripts 自动整理脚本
  • Map compiled CSS to source stylesheets with source maps 使用源映射将已编译的CSS映射到源样式表
  • Awesome image optimization 很棒的图像优化
  • Automagically wire-up dependencies installed with Bower 通过Bower自动连接依赖项
  • The gulpfile makes use of ES2015 features by using Babel gulpfile通过使用Babel来利用ES2015功能

It's simply a joy to work with generator-webapp compared to the SSG workflows. 与SSG工作流程相比,使用generator-webapp实在是一件乐事。 I am also talking about modifying the SSG blog theme too – the post writing in Markdown is usually ok-ish for most SSGs (though eg adding D3 to show a nice visualisation in a post wouldn't be as smooth). 我也正在谈论修改SSG博客主题–在Markdown中,对于大多数SSG而言,撰写文章通常是可以的(尽管例如,添加D3以在帖子中显示漂亮的可视化效果并不那么顺利)。

SSGs that I've tried like Jekyll, Hugo or even Node-based Hexo do provide some basic live reloading and even pre-processors. 我尝试过的诸如Jekyll,Hugo甚至基于Node的Hexo之类的SSG确实提供了一些基本的实时重载甚至是预处理器。 Still, they do not allow you to eg write scripts in ES6, pull in a recent bower package and have it be automatically linked to the site to do a small demonstration of some new technology in a blog post. 但是,它们仍然不允许您例如在ES6中编写脚本,引入最新的Bower软件包,并使其自动链接到该站点,以便在博客文章中进行一些新技术的小规模演示。 This would be possible in something like generator-gulp-angular or generator-webapp , but these on the other hand lack the Markdown processing, theme layout creation with template tags and partials etc. generator-gulp-angulargenerator-webapp之类的东西中可能会发生这种情况,但是另一方面,它们缺少Markdown处理,使用模板标签和局部元素创建主题布局等。

Harp.js looks promising, as it provides the SSG-blog-like functionality and there are attempts to integrate it with BrowserSync or Yeoman generators , but it is still far from ideal. Harp.js看起来很有前途,因为它提供了类似于SSG博客的功能,并且尝试将其与BrowserSyncYeoman生成器集成,但仍远非理想。 Perhaps some sort of composed generator combining Harp and the most recent generator-webapp could be created to combine the best of the frontend web development and SSG blogging workflows. 也许是某种发生器结合竖琴和最新发电机web应用可以创建最好的前端Web开发和SSG博客工作流程相结合。

OK, after quite a bit of exploration and trying out different static site generators, I found the Jekyllized Yeoman generator that wraps some gulp, browsersync etc. magic around Jekyll to be the smoothest approach. 好吧,经过大量的探索并尝试了不同的静态站点生成器之后,我发现Jekyllized Yeoman生成器将一些gulp ,浏览器同步等包装在Jekyll周围,这是最平滑的方法。

There seems to be some progress on a Hugo Yeoman generator from the same author, but it seems to be work in progress at the time of writing. 同一作者的Hugo Yeoman生成器似乎有所进步,但在撰写本文时似乎仍在进行中。

Additionally, you can add jekyll-compose for some basic post/page/draft management from the command line. 另外,您可以从命令行添加jekyll-compose来进行一些基本的帖子/页面/草稿管理。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 es6在yeoman生成器gulp-webapp中不起作用 - es6 not working in yeoman generator gulp-webapp 使用gulp-jade的yeoman Webapp生成器发生Gulp错误 - Gulp error with yeoman webapp generator using gulp-jade 是否有一些gulp插件可以让它执行静态站点生成器的功能? - Is there some gulp plugin that lets it perform the function of a static site generator? 使用gulp在调试中运行Yeoman Generator - Run Yeoman generator in debug using gulp Yeoman发电机使用gulp和角度与快递服务器 - Yeoman generator using gulp and angular with express server 如何在gulp-Angular yeoman生成器中包含不是角度模块的依赖项? - How to include a dependency that is not an angular module in gulp-Angular yeoman generator? 如何使用 webapp 生成器 gulp 构建非缩小的生产代码? - How to build a non minified production code with webapp generator gulp? Yeoman generator-angular:'task wiredep'不在gulpfile中,$ .useref.restore不是函数 - Yeoman generator-angular : 'task wiredep' is not in gulpfile & $.useref.restore is not a function Yeoman定制生成器在创建新项目时会自动安装gulp +依赖项 - Yeoman custom generator automatically install gulp + dependencies when creating new project 哟@microsoft/sharepoint 在此生成器 (@microsoft/sharepoint:app) 上失败,需要 yeoman-environment 至少 3.0.0,当前版本为 2.10.3 - yo @microsoft/sharepoint fails on This generator (@microsoft/sharepoint:app) requires yeoman-environment at least 3.0.0, current version is 2.10.3
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM