{"id":13851880,"url":"https://github.com/sondr3/generator-jekyllized","last_synced_at":"2025-04-06T06:06:39.748Z","repository":{"id":13488359,"uuid":"16178790","full_name":"sondr3/generator-jekyllized","owner":"sondr3","description":"A Yeoman generator for Jekyll to rapidly build sites using Gulp","archived":false,"fork":false,"pushed_at":"2019-10-08T17:23:23.000Z","size":707,"stargazers_count":324,"open_issues_count":8,"forks_count":35,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-03-30T05:08:00.577Z","etag":null,"topics":["gulp","jekyll","rapid-development","yeoman","yeoman-generator"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sondr3.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-23T16:56:38.000Z","updated_at":"2025-01-05T10:04:06.000Z","dependencies_parsed_at":"2022-09-04T01:40:14.782Z","dependency_job_id":null,"html_url":"https://github.com/sondr3/generator-jekyllized","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sondr3%2Fgenerator-jekyllized","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sondr3%2Fgenerator-jekyllized/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sondr3%2Fgenerator-jekyllized/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sondr3%2Fgenerator-jekyllized/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sondr3","download_url":"https://codeload.github.com/sondr3/generator-jekyllized/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441042,"owners_count":20939239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gulp","jekyll","rapid-development","yeoman","yeoman-generator"],"created_at":"2024-08-04T22:00:44.968Z","updated_at":"2025-04-06T06:06:39.719Z","avatar_url":"https://github.com/sondr3.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Scaffolding","脚手架"],"sub_categories":["Yeoman Generators","Yeoman生成器"],"readme":"# generator-jekyllized [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coverage percentage][coveralls-image]][coveralls-url]\n\n# Looking for a (co)-maintainer\nI've since stopped using Jekyll and consequently have neither the time nor need \nto maintain this package, I would however love it if someone who either found this\ngenerator useful or wants to help to take over the responsibility in maintaining\nit. Hit me up on Twitter (@sondr3), Keybase (@sondre) or the mail in my GitHub\nprofile, I'll be more than happy to help you get up and running! :)\n\n***NOTE: Currently using gulp 4.0 which is in beta!***\n\n## Introduction\n\n`generator-jekyllized` is a very opinionated [Yeoman][yeoman] generator built\nwith [Jekyll][jekyll] and [gulp][gulp]. You will be able to quickly scaffold\nyour site and start developing. As you are working on your site your assets will\nautomatically be updated and injected into your browser as well as your posts.\nWhen you are done developing and want to publish it you are two commands away\nfrom having everything optimized and published.\n\n## Features\n\u003e Rapidly prototype\n\nWhile developing locally everything you change will automatically be updated and\ninjected into your browser. Changing your SCSS or JavaScript files will\nautomatically updated them, create sourcemaps and inject them. Writing or\nediting posts and pages for your website will do the same. Simple and effective.\n\n\u003e Jekyll\n\nBuilt on top of Jekyll 3, you get a mature and stable base with the full power\nthat Jekyll brings you. You'll have sitemaps, Atom feeds generated and SEO meta\ndata tags added to your posts and pages.\n\n\u003e Optimize your assets\n\nWhen you are done developing you can have your assets optimized and injected\ncorrectly into your HTML. Your assets will be minified, compressed with gzip,\ncache busted and otherwise optimized. Your images will be run through\ncompressors to save space and even your HTML will be minified.\n\n\u003e Deploying\n\nFinally, once everything is done and you are ready to publish your site, you can\ndo it via either Amazon S3, Github Pages or Rsync. With a single command your\nnew/updated site is uploaded to your platform of choice.\n\n## Getting started\n\n### Installation\n\n#### Dependencies\n* **Ruby**: `\u003e2.0` with Bundler `\u003e1.10`\n* **Node**: `\u003e4.2` and Yo `\u003e1.7.0`\n* **Gulp:** Since the release candidate is running Gulp 4.0 you need to install\n  `gulp-cli`: `npm install gulp-cli -g`\n* **Jekyllized:** Then install Jekyllized: `npm install generator-jekyllized -g`\n\n#### Install\n* **Scaffold:** Run `yo jekyllized` in the directory you want scaffold your site\n    in\n* **Start:** Run `gulp` and watch the magic unfold\n\n#### Update\nTo update the generator, run `npm update -g generator-jekyllized` and then run\n`yo jekyllized:update` and it will update your packages and gulp tasks. You can\nskip installing dependencies by running it with `--skip-install`. **NOTE:**\nUpdating will overwrite any changes you've done to your gulp tasks and\npackage.json, so back them up before running it! It will ask before overwriting\nthough, so you can see the diff before applying it.\n\n## Usage\n\n#### `gulp [--prod]`\n\nThis is the default command, and probably the one you'll use the most. This\ncommand will build your assets and site with development settings. You'll get\nsourcemaps, your drafts will be generated and you'll only generate the last 10\nposts (for speed). As you are changing your posts, pages and assets they will\nautomatically update and inject into your browser via\n[BrowserSync][browsersync].\n\n\u003e `--prod`\n\nOnce you are done and want to verify that everything works with production\nsettings you add the flag `--prod` and your assets will be optimized. Your CSS,\nJS and HTML will be minified and gzipped, plus the CSS and JS will be cache\nbusted. The images will be compressed and Jekyll will generate a site with all\nyour posts and no drafts.\n\n#### `gulp build [--prod]`\n\nThis command is identical to the normal `gulp [--prod]` however it will not\ncreate a BrowserSync session in your browser.\n\n#### `gulp (build) [--prod]` main subtasks\n\u003e `gulp jekyll [--prod]`\n\nWithout production settings Jekyll will only create the 10 latest posts and will\ncreate both future posts and drafts. With `--prod` none of that is true and it\nwill generate all your posts.\n\n\u003e `gulp styles|scripts [--prod]`\n\nBoth your CSS and JS will have sourcemaps generated for them under development\nsettings. Once you generate them with production settings sourcemap generation\nis disabled. Both will be minified, gzipped and cache busted with production\nsettings.\n\n\u003e `gulp images`\n\nOptimizes and caches your images. This is a set it and forget it command for the\nmost part.\n\n\u003e `gulp html --prod`\n\n**Does nothing without `--prod`.** Minifies and gzips your HTML files.\n\n\u003e `gulp serve`\n\nIf you just want to watch your site you can run this command. If wanted you can\nalso edit the `serve` task to allow it to tunnel via [localtunnel][localtunnel]\nso people outside your local network can view it as well:\n\n```js\n    // tunnel: true,\n```\n\nYou can also change the behaviour for how it opens the URL when you run `gulp\n[--prod]`, you can see the options [here][browsersync-open]:\n\n```js\n    // open: false,\n```\n\n#### `gulp deploy`\n\nWhen you're done developing and have built your site with either `gulp --prod`\nor `gulp build --prod` you can deploy your site to either Amazon S3, Github\nPages or with Rsync.\n\n\u003e Amazon S3 and Rsync\n\nIf you chose either of these two, you'll have a `[rsync/aws]-credentials.json`\nfile in your root folder that you have to fill out. It should be pretty self\nexplanatory, however, if you need any help with configuring it, you should check\nout either the [`gulp-awspublish`][awspublish] repo or [`gulp-rsync`][rsync]\nrepo for help.\n\n\u003e Github Pages\n\nIf you chose to upload to Github Pages there's no configuration besides starting\na git repo in your folder, setting an `origin` remote repo and run `gulp\ndeploy`. Your site will be automatically pushed to Github. See the\n[FAQ][frequentlyasked] for configuring personal repos vs project repos.\n\n#### `gulp check`\n\nLints your JavaScript files using ESLint with XO Space settings and run `jekyll\ndoctor` to look for potential errors.\n\n#### `gulp clean`\n\nDeletes your assets from their `.tmp` directory as well as in `dist` and deletes\nany gzipped files. **NOTE:** Does not delete your images from `.tmp` to reduce\nthe time to build your site due to image optimizations.\n\n#### `gulp rebuild`\n\nOnly use this if you want to regenerate everything, this will delete everything\ngenerated. Images, assets, your Jekyll site. You really shouldn't need to do\nthis.\n\n### Subtasks\n\nAll of the subtasks lives in their own files in the `gulp` directory and are\nnamed after what they do. You can edit or look at any of them to see how they\nactually work. They're all commented.\n\n## Frequently Asked Questions\n\n\u003e Inject more than one JavaScript file\n\nIf you want to split up your JavaScript files into say a `index.js` and a\n`vendor.js` file with files from [Bower][bower] you can do this quite easily. Create a\ncopy of the `scripts` gulp task and rename it to `scripts:vendor` and change the\n`gulp.src` files you need:\n\n```js\n  gulp.src([\n    'bower_components/somelibrary.js/dist/somelibrary.js',\n    'bower_components/otherthing.js/dist/otherthing.js'\n  ])\n```\n\nand then change `.pipe(concat('index.js'))` into\n`.pipe(concat('vendor.js'))`. Then you go to the bottom of the gulpfile and\nchange the `assets` task:\n\n```js\ngulp.task('assets', gulp.series(\n  gulp.series('clean:assets'),\n  gulp.parallel('styles', 'scripts:vendor', 'scripts', 'fonts', 'images')\n));\n```\n\nNotice the `scripts:vendor` task that has been added. Also be ware that things\nare injected in alphabetical order, so if you need your vendor scripts before\nthe `index.js` file you have to either rename the `index.js` file or rename the\n`vendor.js` file. When you now run `gulp` or `gulp build` it will create a\n`vendor.js` file and automatically inject it at the bottom of your HTML. When\nrunning with `--prod` it'll automatically optimize and such as well.\n\nFor more advanced uses, refer to the [`gulp-inject`][inject] documentation on\nhow to create individual inject tags and inject specific files into them.\n\n\u003e Github Pages configuration\n\nBy default if you select Github Pages as your deployment option your site will\nbe pushed to a `gh-pages` branch, this works fine for any project pages but\nwon't work for your personal repo. If you want to use a `username.github.io`\nsite all you have to do is to uncomment the `branch` line.\n\n```js\ngulp.task('upload', (done) =\u003e {\n  ghPages.publish(path.join(__dirname + '/../../', 'dist'), {\n    dotfiles: true,\n    // branch: \"master\"\n\t},\n\tdone);\n});\n```\n\nYou might also have to configure the URL for your site if you want to use Github\nPages. Luckily the Jekyll documentation [has you covered][jekyll-url].\n\n\u003e Why don't you support Stylus/LESS/Angular/etc\n\nBecause I've never used them nor do I have any plans of using them. Furthermore,\nthey're a bit outside what I want with this generator anyways. I want a lean,\nsimple and opinionated generator, not a big complicated one.\n\n## Contributing\n\nSee the [contribution][contribute] docs.\n\n## [Changelog][changelog]\n\n## License\n\nMIT © Sondre Nilsen (https://github.com/sondr3)\n\n[awspublish]: https://github.com/pgherveou/gulp-awspublish\n[browsersync]: https://github.com/shakyShane/browser-sync\n[browsersync-open]: https://browsersync.io/docs/options/#option-open\n[contribute]: https://github.com/sondr3/generator-jekyllized/blob/master/CONTRIBUTING.md\n[changelog]: https://github.com/sondr3/generator-jekyllized/blob/master/CHANGELOG.md\n[frequentlyasked]: https://github.com/sondr3/generator-jekyllized#frequently-asked-questions\n[gulp]: http://gulpjs.com/\n[gulpfile]: https://github.com/sondr3/generator-jekyllized/blob/master/generators/gulp/templates/gulpfile.js\n[inject]: https://github.com/klei/gulp-inject\n[jekyll-url]: http://jekyllrb.com/docs/github-pages/#project-page-url-structure\n[jekyll]: https://jekyllrb.com\n[libsass]: https://github.com/hcatlin/libsass\n[localtunnel]: http://localtunnel.me/\n[rsync]: https://github.com/jerrysu/gulp-rsync\n[yeoman]: http://yeoman.io\n[npm-image]: https://badge.fury.io/js/generator-jekyllized.svg\n[npm-url]: https://npmjs.org/package/generator-jekyllized\n[travis-image]: https://travis-ci.org/sondr3/generator-jekyllized.svg?branch=master\n[travis-url]: https://travis-ci.org/sondr3/generator-jekyllized\n[coveralls-image]: https://coveralls.io/repos/sondr3/generator-jekyllized/badge.svg\n[coveralls-url]: https://coveralls.io/r/sondr3/generator-jekyllized\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsondr3%2Fgenerator-jekyllized","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsondr3%2Fgenerator-jekyllized","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsondr3%2Fgenerator-jekyllized/lists"}