Halden's Internship Week 9 July 29, 2024 by Halden Kavanagh internship Week 9 (7/22/24-7/26/24) I started my ninth week at Razoyo by adding an author system to the blog portion of the site. Initially, I underestimated the task and figured I could just add an author page partial to render the person’s picture, bio, etc., followed by a list of all that author’s posts. However, I encountered several issues when trying to store data about the author in the blog content, as the author page was recognized as a post. I resolved this by creating a separate content folder for authors with a custom layout. Now, when a user clicks on an author, they are taken to a dedicated author page that uses its own code to render the author’s blog posts. This approach separates the data and avoids confusion and conditionals that would separate authors from posts. My main task of the week was refining the data bindings in components. This is crucial as it will allow Emily’s team to start creating content. I added rich text editors, icon selectors, and color selectors. Initially, I kept the options for select inputs in the component’s configuration. For example, there was a long list of all available icons and colors in the config. To avoid repetition and unnecessary code, I aimed to store the available icons and colors in the data folder so it could be managed in CloudCannon. This took a while, and at one point, I scrapped the idea and added the select options to the CloudCannon config. While this approach removed repetitive code, it wasn’t as easily manageable through CloudCannon, as it was hidden behind multiple settings in the site config. In my confusion trying to use site data to populate a select input, I messaged CloudCannon support as a last effort to figure it out or see if it was even possible. Friday night, they responded and identified a problem with the syntax I was using to populate the select values. With this information, I couldn’t help myself and added all the icons and colors to site data files, having the select inputs target this data. It works great, avoids unnecessary code, and is much easier to manage in the future. Despite some minor setbacks, this week went well. I made a lot of progress on the bookshop components, and they are fully editable. Hopefully, all that remains are some final touches to style specific elements.