-
-
Notifications
You must be signed in to change notification settings - Fork 41
Upgrade middleman [WIP] #154
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? They don't seem to use any SCSS syntax (AFAIR @keyframes
isa native CSS) asciinema-player.css
-> asciinema-player.scss
?
Side observation: a good part of Asciinema CSS can be dropped, as it contains styles for different themes, and we only use one.
The original is in LESS.
Random notes.
The idea with submodules for deployment should work. I didn't play much around it, but was able to create some mess inside build
directory.
WDYT if I send a PR to replace middleman-deploy
with submodules first, and we apply this PR with Middleman 3->4 upgrade after with less pain?
Dir.glob(File.join(source_dir, "/documentation/#{version}/#{gem_name}/**/*")).select { |f| File.file? f }.each do |f| | ||
relative_path = Pathname.new(f).relative_path_from(Pathname.new(source_dir)) | ||
RSpecInfo::Helpers.rspec_documentation_latest(app.source_dir).each do |gem_name, version| | ||
Dir.glob(File.join(app.source_dir, "/documentation/#{version}/#{gem_name}/**/*")).select { |f| File.file? f }.each do |f| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up with **/*.html
, otherwise it was replacing CSS and JS with some nonsense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean this is supposed to replace css and js...
Gemfile
Outdated
@@ -1,12 +1,14 @@ | |||
source 'https://rubygems.org' | |||
|
|||
gem "middleman", "~> 3.3.6" | |||
gem "middleman", "~> 4.0.0" | |||
gem "middleman-syntax" | |||
gem "middleman-blog" | |||
gem "middleman-favicon-maker" | |||
gem "middleman-deploy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
middleman-deploy
won't work, can be dropped.
I mean thats an orthogonal approach, so it doesn't hurt to try, (replacing deploy before upgrading), but remember the source of the master branch is what github sees and deploys, so I'm sceptical that submodules can work. |
Its the as bundled file, the file was renamed as an attempt to get sass rendering to work (I think it's bundled?) if its not bundled it can probably be left alone. |
I've been able to mostly get HTML rendering working, whats needed mostly is a replacement/restore for sprockets |
efd0d78
to
a3e2b91
Compare
Got a response from support: The CNAME in the repo is what’s used to direct traffic to the right place. What Custom Domain settings does is to create the CNAME file in the repo in an automated fashion. The CNAME isn’t being stored anywhere else.
You still need a way to prevent the CNAME file from being pushed to staging. I'm sorry I could not be of much help here, you may have to find a third-party tool similar "Middleman" or otherwise reach out to "Middleman" support team to check your options after their recent update.I guess we'll have to use something like this to push to staging:
This is what our previous |
Previously Github had |
Maybe your submodule approach is cleaner here, because build will output to a directory, and we can commit and push to the submodules (preferably with a helper command) similar to how the old middleware worked. That way a commit deleting CNAME will stay in the history and as long as we never change CNAME it'll persist. |
Fix the `ignored_sitemap_matchers` for partials. I copied the middleman implementation of this proc and adjusted the docs exception to work with the new method. The `source_file` object is now a struct with multiple versions of the source file path. The exception needed to be checked against the full path and not the relative_path that only included the filename and not the directories. In the proxy file generation for the "latest" version of the docs, that redirects to the actual latest version of the docs, I only selected the `.html` files. This should be okay, and I tested it works. But I had to add this filter because otherwise all the `.css` and `.js` files would be parsed as CSS and JavaScript files. That would then break because those included HTML and cause syntax errors during compilation. Previously in PR rspec#154 this solution was mentioned. I don't know the background here. I think the site doesn't also need to redirect the `.css` and `.js` files. Only the `.html` files redirection should be enough, as it will load the assets from the actual versioned docs.
Fix the `ignored_sitemap_matchers` for partials. I copied the middleman implementation of this proc and adjusted the docs exception to work with the new method. The `source_file` object is now a struct with multiple versions of the source file path. The exception needed to be checked against the full path and not the relative_path that only included the filename and not the directories. In the proxy file generation for the "latest" version of the docs, that redirects to the actual latest version of the docs, I only selected the `.html` files. This should be okay, and I tested it works. But I had to add this filter because otherwise all the `.css` and `.js` files would be parsed as CSS and JavaScript files. That would then break because those included HTML and cause syntax errors during compilation. Previously in PR rspec#154 this solution was mentioned. I don't know the background here. I think the site doesn't also need to redirect the `.css` and `.js` files. Only the `.html` files redirection should be enough, as it will load the assets from the actual versioned docs.
Nope! Closed :) |
Todo: