Customizing Strings.yaml

23 views
Skip to first unread message

Tony Andrews

unread,
Jul 1, 2020, 11:03:34 AM7/1/20
to NYT Library Community
I've pulled a copy to our own Github repository and built the app in Heroku using that repository.  I've copied the strings.yaml file into the "custom" directory and made some changes and I'm not seeing those changes in the app.  To verify, I commented out the "branding" section in the .yaml file and see that the branding information has disappeared (as expected).  Why is it not looking at the file in the "custom" directory? 

Isaac White

unread,
Jul 5, 2020, 3:40:53 PM7/5/20
to Tony Andrews, NYT Library Community
Hi Tony,

Library should default to preferring any overrides from the custom directory, including for the strings.yaml file. Note though, a copy of the strings.yaml file will not replace the original entirely. Only fields that exist in both files will be taken from the strings.yaml in the custom directory.

If none of your changes from the custom/strings.yaml file are coming through at all, Library may not have detected your strings.yaml override.

Two things can be tricky here:
- Library expects the override file to be named very precisely. It should be "strings.yaml" and directly inside the custom folder.
- When using Heroku, the provided config automatically nests the contents of the custom repo inside the custom folder. For example, your customization repo should look something like this for use with the Deploy to Heroku button.   

Does Library detect your custom/strings.yaml when running locally? This could help point more specifically to a Heroku vs customization config problem.

Hope that's helpful.

Isaac

On Wed, Jul 1, 2020 at 11:03 AM Tony Andrews <tand...@isd31.net> wrote:
I've pulled a copy to our own Github repository and built the app in Heroku using that repository.  I've copied the strings.yaml file into the "custom" directory and made some changes and I'm not seeing those changes in the app.  To verify, I commented out the "branding" section in the .yaml file and see that the branding information has disappeared (as expected).  Why is it not looking at the file in the "custom" directory? 

--
You received this message because you are subscribed to the Google Groups "NYT Library Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nyt-library-comm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nyt-library-community/bd7c9849-25ba-472a-a552-330bc5aee0e6n%40googlegroups.com.

Tony Andrews

unread,
Jul 6, 2020, 12:02:28 PM7/6/20
to NYT Library Community
Thanks for the reply Isaac.  

The custom directory looks like this right now:


I have not built a complete local development environment so I'm just working from Heroku right now.   This all might be moot anyway as I have made several minor changes to partials just to customize branding and make it fit more with our theme.

Really nice app.  I have been looking for something to help tie together our documentation and this might just do it for us.  The Search functionality is great! 

Reply all
Reply to author
Forward
0 new messages