You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wonder if some one can help me. Being new at using slate, I followed documentation as per instructions by setting a global variable in config.rb as follow
# Global Variables
set :document_root, 'docs'
config[:document_root]
I then tried to access it as <%= config[:document_root] %> in layout.erb. However, it throws error
NameError at /
undefined local variable or method `document_root' for #<#<Class:0x000055556c4fb430>:0x000055556dda9568>
I also tried to use local data files in project as per Middleman instructions. But that doesnt work either. Any help would be appreciated
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I wonder if some one can help me. Being new at using slate, I followed documentation as per instructions by setting a global variable in
config.rb
as followI then tried to access it as
<%= config[:document_root] %>
inlayout.erb
. However, it throws errorI also tried to use local data files in project as per Middleman instructions. But that doesnt work either. Any help would be appreciated
By the way i am using slate in docker environment
Beta Was this translation helpful? Give feedback.
All reactions