-
Notifications
You must be signed in to change notification settings - Fork 25.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Javascript Changes Not being applied #874
Comments
Smells like a Jekyll issue and not the theme. If the script is updated after you run Other than that I'm out of ideas. Theme files all sounds right, something is going on with Jekyll during the build. Could be some sort of bug you're encountering. Gem theme or is it a fork of the repo? |
I'm using the Gem theme. Yeah, it might be a Jekyll issue then I have no idea. So far, I've tried the following:
The thing is, I see the change is happening within the development folders. Both the main.js and main.min.js have been changed. But for some reason, the files in the site folder all contain the old unmodified code. Just to make sure I'm not missing something, here is my gemfile and includes and excludes gem "jekyll", "~> 3.4.0" Includes and excludes in _config.yml Reading Filesinclude:
exclude:
|
It is indeed a Jekyll issue. This same exact problem came up before and filed a ticket, forgot all about that. Not sure if or when there will be a fix. The problem is Jekyll will only override theme gem assets that have YAML Front Matter, like /assets/css/main.scss. That's why it's ignoring your modified JS files on build. |
Closing as this an upstream issue with Jekyll. |
@DaveBben I found a workaround until this is fixed upstream. If I add YAML Front Matter to
to the top of your modified |
Oh wow you're awesome! Thanks, that would be so helpful. Hoepfully they'll get the Jekyll issued fixed at some point. |
Hopefully that's soon, think I saw it was slated for Jekyll Just pushed an update to MM. Run |
Yess! It works perfectly! The javascript file now reflects the changes. Thanks for all of your help. |
Fantastic! Thanks for checking. |
- Add `---` YAML Front Matter as a workaround to allow the theme gem's version to be overridden locally. - Adjust page scope in Front Matter default to avoid adding a layout to `main.min.js` - Fixes mmistakes#874, Fixes mmistakes#722
@mmistakes Sorry for my simple question.. |
@Harrypotterrrr So if you make changes to |
wow, Appreciate your help! |
- Add `---` YAML Front Matter as a workaround to allow the theme gem's version to be overridden locally. - Adjust page scope in Front Matter default to avoid adding a layout to `main.min.js` - Fixes mmistakes#874, Fixes mmistakes#722
- Add `---` YAML Front Matter as a workaround to allow the theme gem's version to be overridden locally. - Adjust page scope in Front Matter default to avoid adding a layout to `main.min.js` - Fixes mmistakes#874, Fixes mmistakes#722
bundle update
.bundle exec jekyll build
.Environment informations
**Minimal Mistakes version:4.2.2
**github-pages or jekyll gem version:3.4.0
**Operating system: Ubuntu 16.04
Expected behavior
When I make a changes to _main.js, then rebuid using npm, the changes are applied and in the _main.min.js file. However, when I build the site, the _main.min.js file remains unaltered.
Steps to reproduce the behavior
First
I delete the following from main.js
// Follow menu drop down $(".author__urls-wrapper button").on("click", function() { $(".author__urls").fadeToggle("fast", function() {}); $(".author__urls-wrapper button").toggleClass("open"); });
The I run npm run build:js
The main.min.js file is produced and does not contain the deleted code.
FInally I run:
bundle exec jekyll build
In the Site folder, the main.min.js file still contains the deleted code as well as main.js file.
I've also tried with
bundle exec jekyll build --incremental
and the same output occures.
The text was updated successfully, but these errors were encountered: