Git Product home page Git Product logo

gulp-site-generator's People

Contributors

cybolic avatar ducksoupdev avatar l422y avatar sebastiankr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gulp-site-generator's Issues

Image minification task

Re: the images minification and running gulp develop (the live-reload task), this takes a while to complete (couple of minutes in my case), I guess depending on the size and amount of your images.

Wonder if it would be more efficient to have a separate task for image minification that only optimises images for production. What do you think?

Error when running default gulp task after install

After installing and running gulp for the first time, I get the following error:

TypeError: require.extensions.hasOwnProperty is not a function
    at requireDir (/Users/alexrodriguez/Sites/_practice/qwe/node_modules/require-dir/index.js:97:37)

I updated the require-dir npm package to "require-dir": "^0.3.2" and everything worked perfectly. (I am running node version v8.1.3).

"gulp" failed,how to fix it?tks

hi.

root@AR:/usr/local/gulp-site-generator# gulp
[10:31:48] Using gulpfile /usr/local/gulp-site-generator/gulpfile.js
[10:31:48] Starting 'sass'...
[10:31:48] Starting 'copy-fonts'...
[10:31:48] Starting 'copy-css'...
[10:31:48] Starting 'concat-js'...
[10:31:48] Starting 'image-min'...
[10:31:48] Finished 'copy-fonts' after 43 ms
[10:31:48] Finished 'copy-css' after 43 ms
[10:31:48] Finished 'concat-js' after 45 ms
events.js:141
throw er; // Unhandled 'error' event
^

Error: spawn /usr/local/gulp-site-generator/node_modules/mozjpeg/vendor/cjpeg ENOENT
at exports._errnoException (util.js:855:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:455:9)
at process._tickCallback (node.js:369:17)
root@AR:/usr/local/gulp-site-generator#

uncss returns an empty css file

sass to css conversion works fine, but running uncss results in an empty css file. There are a lot of CSS classifiers which are used in my HTML files, so these should remain in the final css file.

issues regarding js files

Hi duck,
gsg is super cool and thank you, I have some issues regarding js. I have added some js files to my site, which add some animations and functionality to my site. while adding js files they should be follow an order, to get right functionality but in the site generator the concat js task mix all the js files in alphabetic order and js related functionality is not working.
I tried using gulp-useref but I didn't found a solution. can you please help for this issue.

Add fallback if slug undefined

Can you add feature or maybe as a fallback if post slug are undefined then it takes post title and convert it to valid slug?

title: This is Title

Will be like this before compiled:

title: This is Title
slug: this-is-title

{{resolve "/path/to/href" }} helper prefixes "./" to all generated links

Testing this system out on Windows 7 Pro 64bit using Node 6.0.0.

For whatever reason, the default {{resolve }} helper in gulp-site-generator is taking the default markup contents and prefixing their href contents with ./...

<!-- partials/header.hbs -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="{{meta_description}}">
    <meta name="author" content="">
    <link rel="icon" href="{{resolve "/favicon.ico"}}">
    <title>{{meta_title}}</title>
    <link rel="stylesheet" type="text/css" href="{{resolve "/css/style.min.css"}}">
    <meta name="generator" content="{{generator}}" />
    <link rel="alternate" type="application/rss+xml" title="{{site.title}}" href="{{rss}}">
</head>

<body>
<!-- resulting markup -->
<!DOCTYPE html>
<html lang=en>
<head>
<meta charset=utf-8>
<meta http-equiv=X-UA-Compatible content="IE=edge">
<meta name=viewport content="width=device-width, initial-scale=1">
<meta name=description>
<meta name=author>
<link rel=icon href=./favicon.ico>
<title>
</title>
<link rel=stylesheet type=text/css href=./css/style.min.css>
<meta name=generator content="Gulp 3.9.1">
<link rel=alternate type=application/rss+xml href=./rss.xml>
</head>
<body>

These ./ prefixes cause Chrome to interpret these links in wierd ways, where each subsequent click appends the links href value to the end of the current page URL and redirects to that now non-existent route.

Did a cursory look into the resolve helper, and its implementation makes little sense to me... it seems this resolvePaths handler defined through the tools/ files is using some seriously inconceivable routes (eg: url: "../../../..",...) when it would be prudent to use something like process.cwd() to construct a relative directory reference.

passing thumbnails into the list view

Is there anyway to do this? I'm building a SEO friendly apps store with this generator, I need thumbnails and possibly other images to be passed into the handlebars each loop

Maybe if we could set dynamic attributes?

image-min / TypeError: dest.on is not a function

Hello,

I am converting a static site with a custom gulpfile.js to your gulp-site-generator setup. I used the subrepo approach. After adding all the dependencies to my package.json, I got this as result on first build:

> gulp

[14:40:58] Using gulpfile /pipeline/source/gulpfile.js
[14:40:58] Starting 'sass'...
[14:40:58] Starting 'copy-fonts'...
[14:40:58] Starting 'copy-css'...
[14:40:58] Starting 'concat-js'...
[14:40:58] Starting 'image-min'...
[14:40:58] 'image-min' errored after 4.26 ms
[14:40:58] TypeError: dest.on is not a function
    at DestroyableTransform.Readable.pipe (/pipeline/source/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:516:8)
    at Gulp.<anonymous> (/pipeline/source/tools/gulp/tasks/image-min.js:16:14)
    at module.exports (/pipeline/source/node_modules/orchestrator/lib/runTask.js:34:7)
    at Gulp.Orchestrator._runTask (/pipeline/source/node_modules/orchestrator/index.js:273:3)
    at Gulp.Orchestrator._runStep (/pipeline/source/node_modules/orchestrator/index.js:214:10)
    at Gulp.Orchestrator.start (/pipeline/source/node_modules/orchestrator/index.js:134:8)
    at /pipeline/source/node_modules/gulp/bin/gulp.js:129:20
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Module.runMain (module.js:592:11)
    at run (bootstrap_node.js:394:7)
    at startup (bootstrap_node.js:149:9)
    at bootstrap_node.js:509:3
(node:104) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Expected a buffer
[14:40:58] Finished 'copy-fonts' after 29 ms
[14:40:58] Finished 'copy-css' after 29 ms
[14:40:58] Finished 'concat-js' after 27 ms
[14:40:58] Finished 'sass' after 91 ms

Here is my package.json:

{
  "name": "rq-website",
  "version": "2016.08.03",
  "description": "ReleaseQueue Product Website",
  "main": "index.js",
  "author": "Ringo De Smet",
  "license": "Commercial",
  "repository": {
    "type": "git",
    "url": "[email protected]:releasequeue/rq-website.git"
  },
  "homepage": "https://bitbucket.com/releasequeue/rq-website",
  "devDependencies": {
    "bluebird": "^3.4.6",
    "downsize": "0.0.8",
    "gulp": "^3.9.1",
    "gulp-compile-handlebars": "^0.6.1",
    "gulp-concat": "^2.6.0",
    "gulp-connect": "^5.0.0",
    "gulp-markdown-to-json": "^1.0.1",
    "gulp-minify-css": "^1.2.4",
    "gulp-minify-html": "^1.0.6",
    "gulp-rename": "^1.2.2",
    "gulp-replace": "^0.5.4",
    "gulp-sass": "^2.3.2",
    "gulp-uglify": "^2.0.0",
    "gulp-uncss": "^1.0.6",
    "imagemin-mozjpeg": "^6.0.0",
    "imagemin-optipng": "^5.2.1",
    "imagemin-pngquant": "^5.0.0",
    "moment": "^2.15.1",
    "mout": "^1.0.0",
    "node-inspector": "^0.12.8",
    "require-dir": "^0.3.0",
    "rss": "^1.2.1"
  },
  "scripts": {
    "help": "gulp --tasks",
    "clean": "gulp clean",
    "build": "gulp"
  }
}

Anything wrong on my side?

Ringo

Add ability to set front-matter default configuration

To avoid repeating frequently used front matter variables for each piece of content, just define defaults for them and only override them where necessary (or not at all).

Also add the ability to use pure markdown (without front-matter) when defaults exist

Not passing a markdown parser to gulp-markdown-to-json?

Shouldn't the code allow for passing a markdown parser to the gulp plugin? The documentation states clearly that you still have to add your own parser:

https://github.com/sparkartgroup/gulp-markdown-to-json#dependencies

The current state of the code doesn't pass anything:

.pipe(markdown())

Currently, I get this error:

> gulp

[15:46:57] Using gulpfile /pipeline/source/gulpfile.js
[15:46:57] Starting 'sass'...
[15:46:57] Starting 'copy-fonts'...
[15:46:57] Starting 'copy-css'...
[15:46:57] Starting 'concat-js'...
[15:46:57] Starting 'image-min'...
[15:46:57] Finished 'copy-fonts' after 35 ms
[15:46:57] Finished 'concat-js' after 30 ms
[15:46:57] Finished 'copy-css' after 55 ms
[15:46:57] Finished 'sass' after 98 ms
[15:46:57] Finished 'image-min' after 142 ms
[15:46:57] Starting 'copy-assets'...
[15:46:57] Finished 'copy-assets' after 4 ms
[15:46:57] Starting 'content'...
/pipeline/source/node_modules/gulp-markdown-to-json/lib/plugin.js:45
    if (!config.renderer || typeof config.renderer !== 'function') return callback(pluginError('Markdown renderer function required'));
               ^

TypeError: Cannot read property 'renderer' of undefined
    at DestroyableTransform._transform (/pipeline/source/node_modules/gulp-markdown-to-json/lib/plugin.js:45:16)
    at DestroyableTransform.Transform._read (/pipeline/source/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:159:10)
    at DestroyableTransform.Transform._write (/pipeline/source/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:147:83)
    at doWrite (/pipeline/source/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:313:64)
    at writeOrBuffer (/pipeline/source/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:302:5)
    at DestroyableTransform.Writable.write (/pipeline/source/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:241:11)
    at Transform.ondata (/pipeline/source/node_modules/readable-stream/lib/_stream_readable.js:542:20)
    at emitOne (events.js:96:13)
    at Transform.emit (events.js:188:7)
    at readableAddChunk (/pipeline/source/node_modules/readable-stream/lib/_stream_readable.js:213:18)
    at Transform.Readable.push (/pipeline/source/node_modules/readable-stream/lib/_stream_readable.js:172:10)
    at Transform.push (/pipeline/source/node_modules/readable-stream/lib/_stream_transform.js:123:32)
    at afterTransform (/pipeline/source/node_modules/readable-stream/lib/_stream_transform.js:79:51)
    at TransformState.afterTransform (/pipeline/source/node_modules/readable-stream/lib/_stream_transform.js:58:12)
    at doReplace (/pipeline/source/node_modules/gulp-replace/index.js:52:18)
    at Transform.transform [as _transform] (/pipeline/source/node_modules/gulp-replace/index.js:74:7)
    at Transform._read (/pipeline/source/node_modules/readable-stream/lib/_stream_transform.js:159:10)
    at Transform._write (/pipeline/source/node_modules/readable-stream/lib/_stream_transform.js:147:83)
    at doWrite (/pipeline/source/node_modules/readable-stream/lib/_stream_writable.js:319:64)
    at writeOrBuffer (/pipeline/source/node_modules/readable-stream/lib/_stream_writable.js:308:5)
    at Transform.Writable.write (/pipeline/source/node_modules/readable-stream/lib/_stream_writable.js:246:11)
    at write (/pipeline/source/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:623:24)

Gulp commands is not work

I followed the installation steps described in the README but the gulp commands do not work.

First after installation node tools/install it gave an error saying that the module "browser-sync" was not found but was solved by installing the packages of the tools folder (this was not described in the README).

But now none of the "build", "develop", "update" commands are working:

image

I don't know if you have the time or interest in fixing this error but would like to use your project because it was the simplest and most complete I found.

Pagination Older & Newer always show hyperlink

Pagination works great but see screenshot below, the conditional statements you have in pagination.hbs don't seem to be working. ie it always shows Older & Newer as hyperlinks even if there aren't any previous or next items to show.

Maybe grey them out or don't show if this scenario occurs?

image

Include browser-sync as devDependencies by default

Hi,

I think it should put browser-sync as devDependencies while generating package.json in root directory!

And also, It would be better if it compare and then merge existing package.json (if any) while generating the new one.

What you think?

Thanks for this helpful tool anyway ...

Replace livereload with browserSync?

LiveReload didn't seem to be working properly for me when running the develop task, so I replaced it with browsersync and it's working much better. If I get time to do it right I can submit a PR if you approve.

Markdown editor for easy editing of posts and pages

Create new task gulp editor that runs in develop mode whilst providing a markdown editor for easy editing and previewing of posts and pages. A tree view of content to edit is available as well as being able to create new content.

concatCSS for vendor libraries

Hi,

I want to use vendor UI kits (such as bootstrap for example). So, How can I concatenate those libs' css files into main style.css like concatJs option?

P.S. I know I can use import command in less files for this!

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.