This repo has two branches: main and gh-pages. Main has the Middleman (https://middlemanapp.com/) code that can be edited. Gh-pages hosts the static files that are served via Github Pages.
HOW TO
Clone this repo in a new computer
- Make sure that Ruby 3.0.2p107 is installed --> https://www.ruby-lang.org/it/documentation/installation/
- From here https://github.com/Alagaesia93/slovenian-singers-middleman click on "Code", "Open on GH desktop"
- open VS Code and run bundle install
- run middleman, visit http://localhost:4567/ and you have the development website
Edit some translations (Translation is a static world in the website, like "Blog", or "About me")
- Open en.yml / sl.yml / it.yml
- Look for the text that you want to edit. Edit, save
- Open website to see that it works
Edit some content (Content is for example a recording, or the bio of a singer)
- Open singers.yml or recording.yml (according to what you want to change)
- Look for the text that you want to edit. Edit, save
- Open website to see that it works
Add a new singer
- Open singers.yml
- Add a ',' after the last }
- Copy an existing singer data (whatever is inside {})
- Edit all the fields
- Take care of the images (copy paste)
- Open the website. Check that there is a new singer in the home page, and his page works both in english and slovenian
Add a new recording
- Open recordins.yml
- Add a ',' after the last }
- Copy an existing recording data (whatever is inside {})
- Edit all the fields
- Take care of the images (copy paste)
- Open the website. Check that there is a new recording in the home page, and filters work
Add a new blog page
- find a short slug for the blog page. Example "juan". Inside source/blog, create two files. juan_en.html.erb and juan_sl.html.erb (and one for every other language you want)
- Copy paste a previous blog article in the new created pages (pay attention to lang: sl in the first section)
- Edit the text / layout
- Open the website to see that it works (new blog post on top, new page for all the languages)
Add a new language
- Open config.rb
- add lang inside available_langs (for example it)
- Create a new file it.yml inside locales. Copy paste an existing .yml file
- replace the first line (from en to it)
- translate all the file content
- For each singer, for each field that ends in _en (example biograph_en), create a new field ending in _it (example biography_it) and add the content
- For each recording, for each field that ends in _it (example title_en), create a new field ending in _it (exmample title_it), and add the content
- Open website and every page and check that it works
Notes There is gh-action that takes middleman files, builds them and writes to gh-pages