Another blogdown site
Hello again, long time no write/read. Also, long time no R programming for me…
Despite my lack of R practice over the previous few months, a recent project emerged that was both familiar and motivating.
My brother runs his own commercial and personal electrical business. He is a skilled electritian with a strong network of tradesman, making it relatively easy for him to find work. But when it comes to reaching beyond who he knows, he is often lacking some of the things I learned back in the day in business school. Marketing.
I thought it would be a great idea to make him a business website for his birthday! Websites explain what the business is, who works for it, and what it can offer. Even thought the business is mostly just him at the moment, I wanted to create a place where he could share more about himself and his successful work.
It also provides a place for new or known people to find him online.
I had made my website nearly a year ago and thought it would be fun to strengthen one thing I know a little bit about… making R blogdown websites.
For this website I dug more into the CSS and purchased a domain! Here is what I learned:
Don’t download, copy, and paste a theme into your working directory
When working with templates on Blogdown you often want to use templates designed by other R programmers. Why do the work yourself?
For my brothers website I choose the Hugo Business Frontpage theme by Cowboysmall.
I wasn’t sure how to build a website that automatically applied the template, but I learned that this is crutial.
On my first attempt, I downloaded (as a .zip) the theme template from GitHub. I then simply copy and pasted the files into my website working directory on my computer. This worked fine at first, but I wasn’t able to deploy the website via Netlify due to configuration issues.
The issue was that Netlify couldn’t find the template. In order for netlify to find and apply the template, I required a reference file in my main working directory.
Instead, you can autogenerated this file path for netlify when you pull the template repository from Git using Blogdown (I’m not sure exactly how this works yet…).
The code for creating a website applying a template is:
blogdown::new_site(theme = ‘lxndrblz/anatole’)
You can edit the website in the template folder
I wanted to change the color and some design features of the website. Not extreme changes, I don’t know CSS, but some minor edits: removing sections of the site, changing pictures, and creating links to my brother’s email.
All of this was done in the template folder.
I choose a simple theme with simple elements to ensure that I could make these basic changes. (Most of my editing just came from searching for words or color codes associated with what I wanted to change on the website)! For more complex themes this will be a bigger issue… I’ll record anything I learn for that time and place.
Yay, I did it!
So happy birthday to my brother - 31 and a successful business man with his own new domain: jwelectric.ca. Please go take a look and let me know what you think. (ᵔᴥᵔ)
The site is deployed and functioning excellent: my first domain, first customer? Nah, not yet. Maybe when his business grows and he needs me to do more with the website functionalities.
Thanks and stay safe everyone! ❤️ - Megan
