Open-Science-Community-Saudi-Arabia / OSCSA-en-blog

OSCSA English blog
https://oscsa-en-blog.netlify.app/
2 stars 15 forks source link

Task #6 Making website Bilingual #25

Closed Mublin closed 2 years ago

Mublin commented 2 years ago

Summary

Fixes # As-salamu-alaikum Wa-rahmatullahi Wa-barakatuh @alswajiab @BatoolMM After hours of research;

List of changes proposed in this PR (pull-request)

What should a reviewer concentrate their feedback on?

netlify[bot] commented 2 years ago

Deploy Preview for oscsa-en-blog ready!

Name Link
Latest commit 95cab70d13d1c8c9ff7ba1001c96aed76f4c8e38
Latest deploy log https://app.netlify.com/sites/oscsa-en-blog/deploys/63494a4c5ddafc000a323e4b
Deploy Preview https://deploy-preview-25--oscsa-en-blog.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

BatoolMM commented 2 years ago

This is AMAZING work @Mublin, thank you for your hard work 🥳 !

My only concern is that I can't see the changes in the deploy preview - It might a problem with the CI, feel free to test it!

Also, I edited the issue a bit to provide more description about the changes in this PR, we usually don't make heavy changes in a single PR but divide it into few PRs to manage the project better and debug it in the future. There are 85 files changed. Can you describe briefly what you did you modify in each file?

Thank you again for your wonderful work!

Mublin commented 2 years ago

This is AMAZING work @Mublin, thank you for your hard work 🥳 !

My only concern is that I can't see the changes in the deploy preview - It might a problem with the CI, feel free to test it!

Also, I edited the issue a bit to provide more description about the changes in this PR, we usually don't make heavy changes in a single PR but divide it into few PRs to manage the project better and debug it in the future. There are 85 files changed. Can you describe briefly what you did you modify in each file?

Thank you again for your wonderful work!

Let me check the deployment issue first

Mublin commented 2 years ago

Assalamu Alaikum, it was along process, I hope

This is AMAZING work @Mublin, thank you for your hard work 🥳 !

My only concern is that I can't see the changes in the deploy preview - It might a problem with the CI, feel free to test it!

Also, I edited the issue a bit to provide more description about the changes in this PR, we usually don't make heavy changes in a single PR but divide it into few PRs to manage the project better and debug it in the future. There are 85 files changed. Can you describe briefly what you did you modify in each file?

Thank you again for your wonderful work!

This is AMAZING work @Mublin, thank you for your hard work 🥳 !

My only concern is that I can't see the changes in the deploy preview - It might a problem with the CI, feel free to test it!

Also, I edited the issue a bit to provide more description about the changes in this PR, we usually don't make heavy changes in a single PR but divide it into few PRs to manage the project better and debug it in the future. There are 85 files changed. Can you describe briefly what you did you modify in each file?

Thank you again for your wonderful work!

It was a long process but let me explain how I managed to make it work; I used the tip in the discussion you gave me but it was not really that useful(creating another two YAML file). so I went into his repo and research on it for a day

Mublin commented 2 years ago

the deployment render on /docs not on /root. We need to change the github pages to /docs. I think it will solve task 5 and 6 @BatoolMM @alswajiab

BatoolMM commented 2 years ago

We are not using GitHub pages, we are using Netlify. Can you explain on the main issue (edit) to add more details of why 85 files changed an what approach you used, please?

BatoolMM commented 2 years ago

Tagging @okerekechinweotito about the CI, the deploy doesn't seem to be working in this PR. Can you possibly test it?

Mublin commented 2 years ago

Assalamu Alaikum,

firstly, the discussion link you gave help a bit because it served as a guide to help me get to that result, I went and research on the repo and downloaded Rstudio on my system. **

After installing, I started using it to look how quarto works, after a while I noticed any time you render index.qmd in Rstudio it creates a _site in which the index.html used by the browsers are located.

Upon research with RStudio I also noticed that when using, index.qmd works together with the _quarto.yml file and the quarto.yml file contain all the pages details (navbar, footer e.t.c)

the YAML (_quarto.yml) file works uniquely; because when you add an item in the navbar or footer and you add an href to the item you added, it searches for the directory or link(in our case directory), in which the href is located e.g you add to the navbar; navbar: background: light collapse-below: lg logo: logo3.png title: false right:

in this example I added a text ARABIC with it's href: AR . when the site loads and you click on ARABIC on the navbar it takes you directly to /AR/ directory in the folder. when it searches and found it, it enters the /AR/ directory and searches for any index.html file to be displayed(to be more specific it looks for the files in _site directory which _quarto created (e.g site_libs, index.html, about.html e.tc)) when it enters it, it displays the index.html in the /AR/ directory

so when I noticed that; I figured how it works and then I used the knowledge I found a way to make it happen.

so I asked for the arabic version of the website what we want in the arabic version, ran it on my Rstudio got the _site files and copied it to the /AR/ directory and I made some changes in the /AR/ index.html like a normal html becuase on render it does not overrides like the english version because the English version is using the index.qmd and _quarto.yml while the arabic version is using the /AR/ directory files

My advice;

The arabic blog repo should be kept beacuse it will be useful as we use the files that get created when we render because we use the _site folder files and copy them to the original repo(/AR/ directory)

THANK YOU I HOPE YOU UNDERSTAND @BatoolMM @alswajiab if there is anything, you can ask me. I know my explanations is not that good but I really hope you understand. Thank you. Alhamdullilah.