我正在使用独白的宝石和独白生成的视图。我正在尝试编辑视图,但我在浏览器中实际显示的任何视图文件中都没有写任何内容。这是我的路线文件中的行:
mount Monologue::Engine, at: '/blog'
这是我的monologue.rb文件:
Monologue.config do |config|
config.site_name = "My blog"
config.site_subtitle = "my own place online"
config.site_url = "http://example.com"
config.meta_description = "This is my blog about..."
config.meta_keyword = "music, fun"
config.admin_force_ssl = false
config.posts_per_page = 10
# config.disqus_shortname = "my_disqus_shortname"
# LOCALE
config.twitter_locale = "en" # "fr"
config.facebook_like_locale = "en_US" # "fr_CA"
config.google_plusone_locale = "en"
#config.layout = "layouts/application"
# ANALYTICS
# config.gauge_analytics_site_id = "YOUR COGE FROM GAUG.ES"
# config.google_analytics_id = "YOUR GA CODE"
config.sidebar = ["latest_posts", "latest_tweets", "categories", "tag_cloud"]
#SOCIAL
config.twitter_username = "myhandle"
config.facebook_url = "https://www.facebook.com/myhandle"
config.facebook_logo = 'logo.png'
config.google_plus_account_url = "https://plus.google.com/u/1/.../posts"
config.linkedin_url = "http://www.linkedin.com/in/myhandle"
config.github_username = "myhandle"
config.show_rss_icon = true
end
出于某种原因,我可以删除或添加任何独白视图文件的行,例如views/blog/layouts/application.html.erb
并且没有任何更改。我已经尝试取消注释monologue.rb文件中的行#config.layout = "layouts/application
并从浏览器中取消所有样式(虽然我创建的css文件仍然在浏览器中被调用和提供)但仍然没有变化在HTML中实际工作。为什么我的更改都没有真正反映在浏览器中?
答案 0 :(得分:0)
在父Rails应用程序中为引擎生成视图后,对于独白结构有点混乱。我认为应该对链接等进行自动更改(我在此发布https://github.com/jipiboily/monologue/issues/294)。基本上你必须使用父应用程序布局并将其与目录结构相匹配。