Personal Website Updates Notes
Published:
notes about how to update the websites
1. Some General Documentations
- About Github pages: https://pages.github.com/
2. File Locations
Item | Location |
---|---|
A new category at homepage | /_pages/about.html |
A new blog post | /_posts |
Icon for a new programing project at project page | /_pages/projects.html |
Icon for a new design project at project page | /_pages/projects.html |
Contents for a new programing project at project page | /_posts/%PP-00X-programing-project-name%.html |
Contents for a new design project at project page | /_posts/%DP-00X-design-project-name%.html |
Images for a new design project at project page | /images |
CV | /_pages/cv.md |
Self introduction at homepage | /_includes/author-profile.html |
Travel website statement + Travel map update | /_posts/travel.html |
3. Commit the Updates
Under the main repo, git add, git commit, git push.\
When git push, it may asks for passphrase for ssh. To find it: check the notebook.\
To avoid typing in passphrase for ssh key each time, type in:\
eval `ssh-agent -s`
ssh-add ~/.ssh/*_rsa
4. Test Deploy
It takes very long to comit, push and finish building the website before we can see the update each time. Instead, we can use jekell.
bundle exec jekyll serve
- Install following the instructions.
- Make sure under the main directory.
- Run
bundle exec jekyll serve
- Go to the local host http://127.0.0.1:4000/
5. Update the Travel Map
- I used to depend on the Tableau workflow, but it requires creating and exporting maps in Tableau public, which is cumbersome. Because of this, I switched to a js scripts.
- With the js scripts, I only need to update
countries-highres.geojson
(for countries) andtravled_cities
(for cities), the map will be automatically re-generated once the website is re-deployed.
6. Caveat
- Try to downsize the images, as it will slower the loading time of pages.
- Use https://web.dev/measure/ to diagnose website performance.