Closed zorbathegreek closed 6 years ago
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
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 gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5 npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated graceful-fs@1.2.3: 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
- gulp@3.9.1 added 274 packages in 33.768s
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
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 your-email@domain.com
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
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 "your-email@domain.com" to something different.
But when I do grep -R "your-email@domain.com" in the root of the project, I get 281kb of text (attached) with "email@domain.com" 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@domain.com" 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?!
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:
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
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
Hello, I'm back. I have followed your recommendations from here https://janczizikow.github.io/sleek/contact/ and changed the email address in both mentioned files, _js/scripts.js and _config.yml Verify that here if you like https://github.com/zorbathegreek/shift-latest/blob/master/_js/scripts.js and here https://github.com/zorbathegreek/shift-latest/blob/master/_config.yml However, it doesn't work. I have reset the email address at fromspree (they have a reset tool there) https://formspree.io/unblock/your@email.com and wrote to the people at formspree. They replied this:
So, I changed the email address, but why is it still sending to the default address? Any help would be greatly appreciated! Regards, Anthony