Problem with downloading new "sections" path/folder
sarhov opened this issue ยท 11 comments
Yea I've noticed this doesn't work, just means I have to edit section files using the online editor!
I would say this is quite high priority feature. Editing html in admin isn't exactly what you want to do.
+1
Temporary workaround, adds /sections to the default whitelist and rebuilds the gem:
gem uninstall theme
git clone https://github.com/Shopify/shopify_theme.git
sed -i -e 's/assets\//assets\/ sections\//g' shopify_theme/lib/shopify_theme/cli.rb
cd shopify_theme/
gem build shopify_theme.gemspec
gem install shopify_theme-0.0.25.gem
Thanks @cameroncowden!! Great workaround! :)
Thanks for @cameroncowden workaround. Alternatively, I did it by:
- MACOS: Open to file /Library/Ruby/Gems/2.0.0/gems/shopify_theme-0.0.25/lib/shopify_theme/cli.rb. You might have to grant it writable permission (right click > get info > update to Read & Write)
Windows: the path will look like "C:\Ruby23-x64\lib\ruby\gems\2.3.0\gems\shopify_theme-0.0.25\lib\shopify_theme\cli.rb" - Look for the "DEFAULT_WHITELIST" line and add sections/ at the end. This line will look like this:
DEFAULT_WHITELIST = %w(layout/ assets/ config/ snippets/ templates/ locales/ sections/) - Save the file
- Edit the config.yml to add sections/ into the :whitelist_files:
- There you go.
+1
Thanks @luongvanphuc. It was nice to see the explanation.
+1 Thanks @cameroncowden