Skip to content
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

Bug - Views after being copied should append blog directory to layouts #294

Open
illegalnumbers opened this issue Nov 8, 2016 · 7 comments

Comments

@illegalnumbers
Copy link
Contributor

By default it can be confusing that all the views still reference all the original monologue gem views (at monologue) but your blog gets generated on a similar file system setup and it can take a couple seconds to realize 'Oh, I need to change all these URLs to reference my new filesystem or itll not reflect any changes.'

@jipiboily
Copy link
Owner

I don't understand what you mean here, can you give me an example please?

@illegalnumbers
Copy link
Contributor Author

Sorry, let me explain more.

So, one thing that happens after you run the rake task to get views copied over to your Rails application is that the render statements default to the original gem views.

This can be confusing.


For example, on first glance

<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
  <%= render 'layouts/monologue/application/head' %>
</head>
<body>
  <div class="container">
    <header class="main-header sixteen columns clearfix">
      <%= rss_icon %>
      <h1><a href="<%= root_path %>"><%=Monologue::Config.site_name%></a></h1>
      <h2><%=Monologue::Config.site_subtitle%></h2>
      <%= render partial: "layouts/monologue/application/social_icons" %>
    </header>
    <div class="content twelve columns">
      <% flash.each do |name, msg| %>
        <div class="flash-notice">
          <%= msg %>
        </div>
      <% end %>

      <%= yield %>
    </div>
      <%= render 'blog/layouts/monologue/application/sidebar' %>
  </div>
  <% if content_for?(:footer) %>
    <footer>
      <%= yield :footer %>
    </footer>
  <% end %>
  <%= render 'layouts/monologue/application/disqus' %>
  <%= render 'layouts/monologue/application/gauge_analytics' %>
</body>
</html>

The disqus, guage_analytics, etc are all from the gem but my sidebar is from my override. It would be nice if it just defaulted all items when you copy over the views to the newly copied views instead of defaulting to the gem. The paths can be confusing.

@jipiboily
Copy link
Owner

Ah, that's how Rails works. Maybe it could be worth adding a note in the README or somewhere about that, though? Thoughts?

@illegalnumbers
Copy link
Contributor Author

Right, it's how Rails works for the rendering but the Rake task should be able to just modify the html as it's copied over for you - no?

@jipiboily
Copy link
Owner

Yeah, the generator should def be fixed or tell you to copy them over.

@illegalnumbers
Copy link
Contributor Author

Should be a simple patch at least.

@msevestre
Copy link
Collaborator

PR welcome :-)

On Fri, Nov 11, 2016, 11:39 AM Ben Nelson notifications@github.com wrote:

Should be a simple patch at least.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#294 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA_jVRnxJ1AfNsQXSpQDkcduV6wy6Ja2ks5q9Jo9gaJpZM4KsD70
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants