Giter VIP home page Giter VIP logo

Comments (6)

janczizikow avatar janczizikow commented on August 18, 2024

Hey @zorbathegreek

Did you run gulp or gulp js in your command line after making changes in _js/scripts.js? this is just an entry file for gulp. After running the command it will be bundled with the js dependencies (like jquery and others), minified and outputted in /assets/js/bundle.js/. assets folder will be included in the actuall jekyll site, so all the CSS and JS is actually coming from that folder. Probably I should update the documentation to be a bit more clear on this.

Let me know if that helped you. In case you need more guidance on gulp you can check out this guide: https://css-tricks.com/gulp-for-beginners/

Cheers,
Jan

from sleek.

zorbathegreek avatar zorbathegreek commented on August 18, 2024

Hello Jan,

thanks for your feedback.

Bad news: gulp seems to be in (temporary) trouble.
Following your link as above
https://css-tricks.com/gulp-for-beginners/
only gets me so far:
Installing node works, but then:

[root@localhost shift-latest]# npm install gulp -g
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
/usr/bin/gulp -> /usr/lib/node_modules/gulp/bin/gulp.js

The link included in the warning above
https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
doesn't look promising for the time being.

Given the gulp glitch, and Formspree in it's current setup not working without gulp, is there a way to temporarily implement Formspree without gulp, Ajax etc?

Best regards,

Anthony

from sleek.

janczizikow avatar janczizikow commented on August 18, 2024

Hey @zorbathegreek,

Hmmm. Which version of gulp do you have installed? I think what you could try is to actually uninstall gulp globally: npm uninstall -g gulp - the project already includes gulp 3.9.1 and (as opposed to version 4) you don't need gulp-cli installed to use gulp 3+. (If you have version 4, you would have to adjust a lot of stuff in gulpfile.js, since the syntax changed a bit).

If you have Node.js & npm installed (and you got rid of globally installed gulp), just navigate in your terminal to root of the project folder (e.g.: cd documents/web/projects/sleek). Once you're at the root of the project run npm install to install all the packages the project depends on and then try to run gulp.

If you don't want to use gulp to run tasks for you, what you could also do is to find the 'example email address' in /assets/js/bundle.js. I don't really recommend it because you'll be working with minified and uglified js file. But you can just search for [email protected] and replace it with the email to which you want to receive the submissions.

For me, everything works fine with Node 8.9.4, npm 5.6.0 & gulp 3.9.1 (Local version included in the project).

Cheers,
Jan

from sleek.

zorbathegreek avatar zorbathegreek commented on August 18, 2024

Hello Jan,

here is what I have installed.
[user@localhost ~]$ gulp -v
[10:44:47] CLI version 3.9.1
[user@localhost ~]$ node -v
v8.9.4
[user@localhost ~]$ npm -v
5.6.0

I don't have Node.js installed

I sure changed the email address "[email protected]" to something different.

But when I do
grep -R "[email protected]"
in the root of the project, I get 281kb of text (attached) with "[email protected]" mentioned only in the README.md file (where it is o.k. to be mentioned!) and once more in
_site/assets/js/bundle.
where it shouldn't.

"[email protected]" not found in _config.yml and not in _js/scripts.js

So the question is, where on earth does that old email address come from?

Hmmm. I just noticed that the _site folder is not regenerated. (I renamed it and restarted the server).

So there is an underlying problem here... which explains why Formspree sends mail to the wrong address... though not why I have a stale _site folder.

Any idea?

Oh, and bundle exec jekyll site doesn't work anymore; jekyll serve works but I guess it won't do all it should neither.
[user@localhost shift-latest]$ bundle exec jekyll serve
/home/user/bin/bundle:23:in `load': cannot load such file -- /home/user/.gem/ruby/gems/bundler-1.15.4/exe/bundle (LoadError)
from /home/user/bin/bundle:23:in

I wonder if I should clone your repo once more and start from scratch?!

from sleek.

janczizikow avatar janczizikow commented on August 18, 2024

Hey @zorbathegreek ,

If you change the email within _js/scripts.js or assets/js/bundle.js you still need to build your jekyll site to see the results, since the site would be served from _site folder as usually in jekyll (either by bundle exec jekyll build/bundle exec jekyll serve or gulp. So you're right, it's the problem of jekyll generating the site. I've downloaded the project from your repo, but I couldn't reproduce the gulp error you have. I ran npm install and bundle install and both gulp + jekyll exec bundle serve worked fine for me. Do you have bundler bundler installed on your local machine as well? if no try running gem install bundler to install it. The error you're seeing after bundle exec jekyll serve might because of that.

I guess it's also worth mentioning that if you build jekyll site with bundle exec jekyll serve you will need to modify the js files in assets/js/bundle.js not in _js folder. Jekyll ignores the folders starting with _ and they will not be copied to _site folder once the site is built and anyways the script src in html is will be looking for /assets/js/bundle.js file. _js/scripts will be complied only when using gulp.

After building the site it seems that bundle.js has the right email:
bundle

Not really sure why you have the issue with gulp, but you can also try to build the site with bundle exec jekyll build or bundle exec jekyll serve to start a local server. Also, gulp-util isn't included in the gulpfile, so I think it might be something wrong with the gulp/node on your local machine.

Let me know if bundle exec jekyll serve worked for you!

Cheers,
Jan

from sleek.

zorbathegreek avatar zorbathegreek commented on August 18, 2024

Hello Jan,
sorry for the delay. Many things happening here...
I could have done this in a virtual box, but I revived a 32 bit machine and installed everything jekyll, and your theme works.
Also received an email from Formspree requesting to confirm that you apparently initiated. Even received their response when I filled the contact form from 127.0.0.0:
No idea what went wrong last week, but I haven't tried gulp and npm yet.
Will keep you posted if something goes wrong again, and also if it doesn't. Please close this issue for the time being!
Anthony

from sleek.

Related Issues (20)

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.