Repository navigation
Conversation
|
@nhr please take a look. Requires a messy rebase that I'll do after initial feedback. |
|
Per IRC chat will need to adjust the approach once asciibinder supports site-specific templates more elegantly. This PR will either be closed or significantly modified. |
8cc6f6a to
ed10483
Compare
8014891 to
6d58e9a
Compare
| <%= render("_templates/_footer.html.erb", :distro_key => distro_key, :images_path => images_path) %> | ||
| </body> | ||
| </html> | ||
| <%= render((distro_key['atomic'] ? "_templates/_page_atomic.html.erb" : "_templates/_page_atomic.html.erb"), |
There was a problem hiding this comment.
I think the second one here should be _page_openshift.html.erb
There was a problem hiding this comment.
I think the second one here should be _page_openshift.html.erb
@Fryguy good catch. This is a workaround that I need help with.
Rendering the openshift page returns this error:
Error: Could not generate docs: undefined local variable or method `images_path' for #<AsciiBinder::TemplateRenderer:0x007f957b398e98>.
Full output: https://paste.fedoraproject.org/348201/14595147/ It may be a simple ruby issue I'm not aware of. Any ideas?
There was a problem hiding this comment.
That's really weird and I'm not sure...I'll try checking out your branch and taking a look
There was a problem hiding this comment.
So, I added some debugging to the asciibinder gem, and narrowed it down to the footer...still trying to understand why that is causing problems though.
/Users/jfrey/dev/openshift-docs/_templates/_footer.html.erb:1:in `block in singleton class': undefined local variable or method `images_path' for #<AsciiBinder::TemplateRenderer:0x007f8b2c0b3ad8> (NameError)
from /Users/jfrey/dev/openshift-docs/_templates/_footer.html.erb:-6:in `instance_eval'
from /Users/jfrey/dev/openshift-docs/_templates/_footer.html.erb:-6:in `singleton class'
from /Users/jfrey/dev/openshift-docs/_templates/_footer.html.erb:-8:in `__tilt_70117841297920'
from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `call'
from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `evaluate'
from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:99:in `render'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/template_renderer.rb:24:in `render'
from /Users/jfrey/dev/openshift-docs/_templates/_page_openshift.html.erb:92:in `block in singleton class'
from /Users/jfrey/dev/openshift-docs/_templates/_page_openshift.html.erb:-28:in `instance_eval'
from /Users/jfrey/dev/openshift-docs/_templates/_page_openshift.html.erb:-28:in `singleton class'
from /Users/jfrey/dev/openshift-docs/_templates/_page_openshift.html.erb:-30:in `__tilt_70117841297920'
from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `call'
from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `evaluate'
from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:99:in `render'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/template_renderer.rb:24:in `render'
from /Users/jfrey/dev/openshift-docs/_templates/page.html.erb:1:in `block in singleton class'
from /Users/jfrey/dev/openshift-docs/_templates/page.html.erb:-29:in `instance_eval'
from /Users/jfrey/dev/openshift-docs/_templates/page.html.erb:-29:in `singleton class'
from /Users/jfrey/dev/openshift-docs/_templates/page.html.erb:-31:in `__tilt_70117841297920'
from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `call'
from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `evaluate'
from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:99:in `render'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/template_renderer.rb:24:in `render'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:259:in `page'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:761:in `configure_and_generate_page'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:601:in `block (4 levels) in generate_docs'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:591:in `each'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:591:in `block (3 levels) in generate_docs'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:587:in `each'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:587:in `block (2 levels) in generate_docs'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:544:in `each'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:544:in `block in generate_docs'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:511:in `each'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:511:in `generate_docs'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/bin/asciibinder:14:in `call_generate'
from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/bin/asciibinder:268:in `<top (required)>'
from /Users/jfrey/.gem/ruby/2.2.4/bin/asciibinder:23:in `load'
from /Users/jfrey/.gem/ruby/2.2.4/bin/asciibinder:23:in `<main>'
TODO for me: create a PR on asciibinder to properly expose errors. cc @nhr
| </div> | ||
| </div> | ||
| <div class="visible-xs-block row row-offcanvas row-offcanvas-left"> | ||
| <%= render("_templates/_footer.html.erb", :distro_key => distro_key, :images_path => images_path) %> |
There was a problem hiding this comment.
Oh here it is...the old one passed the images path to the footer....
|
Closing. See #1883 |
This refactors the HTML templates to add an Atomic-branded build.
Depends on
#1693#1694