Skip to content

Commit

Permalink
Started migration to polyglot
Browse files Browse the repository at this point in the history
Signed-off-by: George Araujo <[email protected]>
  • Loading branch information
george-gca committed Feb 24, 2024
1 parent b607e58 commit db3b671
Show file tree
Hide file tree
Showing 164 changed files with 4,890 additions and 785 deletions.
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/1_bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ body:
If it's a question about how al-folio works, have a look at our [documentation](https://github.com/alshedivat/al-folio/blob/master/README.md),
[frequently asked questions](https://github.com/alshedivat/al-folio/blob/master/FAQ.md),
[past questions](https://github.com/alshedivat/al-folio/discussions/categories/q-a),
or [ask a question](https://github.com/alshedivat/al-folio/discussions/new?category=q-a).
or [ask a question](https://github.com/alshedivat/al-folio/discussions/new?category=q-a) there. If your question is related to localization,
please check if it was not already answered in the Q&A section of the [GitHub Discussions](https://github.com/george-gca/multi-language-al-folio/discussions/categories/q-a) or
[ask a question](https://github.com/george-gca/multi-language-al-folio/discussions/new?category=q-a).
- type: checkboxes
id: requirements
Expand All @@ -20,7 +22,7 @@ body:
Please check if somebody else has already filed the same issue.
If you find a similar issue, please add a 👍 reaction or comment on the original post.
options:
- label: I read through [FAQ](https://github.com/alshedivat/al-folio/blob/master/FAQ.md) and searched through the [past issues](https://github.com/alshedivat/al-folio/issues), none of which addressed my issue.
- label: I read through [FAQ](https://github.com/george-gca/multi-language-al-folio/blob/master/FAQ.md) and searched through the past issues both in the [original repo](https://github.com/alshedivat/al-folio/issues) and [this one](https://github.com/george-gca/multi-language-al-folio/issues), none of which addressed my issue.
required: true
- label: Yes, I have checked that this issue isn't already filed.
required: true
Expand Down
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/2_feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ body:
If it's a question about how al-folio works, have a look at our [documentation](https://github.com/alshedivat/al-folio/blob/master/README.md),
[frequently asked questions](https://github.com/alshedivat/al-folio/blob/master/FAQ.md),
[past questions](https://github.com/alshedivat/al-folio/discussions/categories/q-a),
or [ask a question](https://github.com/alshedivat/al-folio/discussions/new?category=q-a).
or [ask a question](https://github.com/alshedivat/al-folio/discussions/new?category=q-a) there. If your question is related to localization,
please check if it was not already answered in the Q&A section of the [GitHub Discussions](https://github.com/george-gca/multi-language-al-folio/discussions/categories/q-a) or
[ask a question](https://github.com/george-gca/multi-language-al-folio/discussions/new?category=q-a).
- type: checkboxes
id: requirements
Expand All @@ -20,7 +22,7 @@ body:
Please check if somebody else has already filed the same 🚀 feature request.
If you find a similar feature request, please add a 👍 reaction or comment on the original post.
options:
- label: I read through [FAQ](https://github.com/alshedivat/al-folio/blob/master/FAQ.md) and searched through the [past issues](https://github.com/alshedivat/al-folio/issues), none of which addressed my feature request.
- label: I read through [FAQ](https://github.com/george-gca/multi-language-al-folio/blob/master/FAQ.md) and searched through the past issues both in the [original repo](https://github.com/alshedivat/al-folio/issues) and [this one](https://github.com/george-gca/multi-language-al-folio/issues), none of which addressed my issue.
required: true
- label: Yes, I have checked that this feature request isn't already filed.
required: true
Expand Down
5 changes: 4 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ contact_links:
- name: ❓ Ask a Question
url: https://github.com/alshedivat/al-folio/discussions/categories/q-a
about: Ask and answer al-folio related questions.
- name: ❓ Ask a Question (Localization)
url: https://github.com/george-gca/multi-language-al-folio/discussions/categories/q-a
about: Ask and answer al-folio questions related to localization.
- name: 📖 Read the documentation
url: https://github.com/alshedivat/al-folio/blob/master/README.md
url: https://github.com/george-gca/multi-language-al-folio/blob/master/README.md
about: Please consult the documentation before opening any issues!
2 changes: 1 addition & 1 deletion .github/workflows/broken-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ jobs:
with:
fail: true
# removed md files that include liquid tags
args: --exclude-path README.md --exclude-path _pages/404.md --exclude-path _pages/blog.md --exclude-path _posts/2018-12-22-distill.md --verbose --no-progress './**/*.md' './**/*.html'
args: --exclude-path README.md --exclude-path _pages/404.md --exclude-path _pages/blog.md --exclude-path _posts/en-us/2018-12-22-distill.md --exclude-path _posts/pt-br/2018-12-22-distill.md --verbose --no-progress './**/*.md' './**/*.html'
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docker-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: amirpourmand/al-folio
images: georgegca/multi-language-al-folio

- name: Login
uses: docker/login-action@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
if: github.repository_owner == 'alshedivat'
if: github.repository_owner == 'george-gca'

steps:
- name: Checkout
Expand All @@ -40,4 +40,4 @@ jobs:
context: .
push: true
platforms: linux/amd64,linux/arm64/v8
tags: amirpourmand/al-folio
tags: georgegca/multi-language-al-folio
6 changes: 3 additions & 3 deletions .github/workflows/docker-slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
build:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-a-workflow-based-on-the-conclusion-of-another-workflow
if: ${{ github.event.workflow_run.conclusion == 'success' }} and github.repository_owner == 'alshedivat'
if: ${{ github.event.workflow_run.conclusion == 'success' }} and github.repository_owner == 'george-gca'
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -44,8 +44,8 @@ jobs:
DSLIM_TARGET_COMPOSE_SVC: jekyll
DSLIM_CONTINUE_AFTER: signal
with:
target: amirpourmand/al-folio
target: georgegca/multi-language-al-folio
tag: "slim"

# Push to the registry
- run: docker image push amirpourmand/al-folio:slim
- run: docker image push georgegca/multi-language-al-folio:slim
6 changes: 3 additions & 3 deletions .github/workflows/lighthouse-badger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ name: "Lighthouse Badger"

# INPUTS as environmental variables (env) for not manually triggered workflows
env:
URLS: https://alshedivat.github.io/al-folio/
TOKEN_NAME: LIGHTHOUSE_BADGER_TOKEN
URLS: https://george-gca.github.io/multi-language-al-folio/
TOKEN_NAME: LIGHTHOUSE_BADGER_TOKEN_SECRET # name of the secret that contains the token
# If any of the following env is blank, a default value is used instead
REPO_BRANCH: "${{ github.repository }} master" # target repository & branch e.g. 'dummy/mytargetrepo main'
REPO_BRANCH: "${{ github.repository }} main" # target repository & branch e.g. 'dummy/mytargetrepo main'
MOBILE_LIGHTHOUSE_PARAMS: "--only-categories=performance,accessibility,best-practices,seo --throttling.cpuSlowdownMultiplier=2"
DESKTOP_LIGHTHOUSE_PARAMS: "--only-categories=performance,accessibility,best-practices,seo --preset=desktop --throttling.cpuSlowdownMultiplier=1"

Expand Down
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
assets/css/main.scss
assets/plotly/demo.html
lighthouse_results/**
_posts/2015-10-20-math.md
_posts/en-us/2015-10-20-math.md
_posts/pt-br/2015-10-20-math.md
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to al-folio
# Contributing to multi-language-al-folio

Thank you for considering contributing to al-folio!
Thank you for considering contributing to al-folio or its multilingual version! Please check if your contribution is related to the template itself or to the multilingual aspect of it. If it is the former, please consider doing it in the original [al-folio](https://github.com/alshedivat/al-folio/) repository. If it is the latter, follow the instructions below.

## Pull Requests

Expand All @@ -14,13 +14,13 @@ We use GitHub issues to track bugs and feature requests.
Before submitting an issue, please make sure:

1. You have read [the FAQ section](FAQ.md) of the README and your question is NOT addressed there.
2. You have done your best to ensure that your issue is NOT a duplicate of one of [the previous issues](https://github.com/alshedivat/al-folio/issues).
2. You have done your best to ensure that your issue is NOT a duplicate of one of [the previous issues](https://github.com/george-gca/multi-language-al-folio/issues).
3. Your issue is either a bug (unexpected/undesirable behavior) or a feature request.
If it is just a question, please ask it in the [Discussions](https://github.com/alshedivat/al-folio/discussions) forum.
If it is just a question, please ask it in the [Discussions](https://github.com/george-gca/multi-language-al-folio/discussions) forum.

When submitting an issue, please make sure to use the appropriate template.

## License

By contributing to al-folio, you agree that your contributions will be licensed
By contributing to multi-language-al-folio, you agree that your contributions will be licensed
under the LICENSE file in the root directory of the source tree.
28 changes: 21 additions & 7 deletions CUSTOMIZE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Customize

Here we will give you some tips on how to customize the website.
Here we will give you some tips on how to customize the website. Note that throughout the [README.md](README.md) and [CUSTOMIZE.md](CUSTOMIZE.md) files, the default language is English (LANG = en-us). You must have an equivalent file or path for each language you have defined in [\_config.yml](_config.yml). For example, if you have defined `languages: ["en-us", "pt-br"]`, you must have 2 versions of the file `_data/LANG/cv.yml`: [\_data/en-us/cv.yml](_data/en-us/cv.yml) and [\_data/pt-br/cv.yml](_data/pt-br/cv.yml).

## Project structure

Expand All @@ -10,13 +10,21 @@ The project is structured as follows, focusing on the main components that you w
.
├── 📂 assets/: contains the assets that are displayed in the website
│   └── 📂 json/
│   └── 📄 resume.json: CV in JSON format (https://jsonresume.org/)
│   └── 📄 resume_LANG.json: CV in JSON format (https://jsonresume.org/)
├── 📂 _bibliography/
│   └── 📄 papers.bib: bibliography in BibTeX format
├── 📄 _config.yml: the configuration file of the template
├── 📂 _data/: contains some of the data used in the template
│   ├── 📄 cv.yml: CV in YAML format, used when assets/json/resume.json is not found
│ ├── 📂 LANG/: data for the LANG version. Must have one for each language defined in _config.yml
│   │ └── 📄 cv.yml: CV in YAML format, used when assets/json/resume_LANG.json is not found
│   └── 📄 repositories.yml: users and repositories info in YAML format
├── 📂 _i18n/: contains the translations of the template
│ ├── 📂 LANG/: must have one for each language defined in _config.yml
│ │ ├── 📂 _news/: the localized content of the news that will appear in the news section in the about page
│ │ ├── 📂 _pages/: the localized content of some pages
│ │ ├── 📂 _posts/: contains the localized blog posts
│ │ ├── 📂 _projects/: contains the localized content of the projects
│   └── 📄 LANG.yml: localized variables (placeholders). Must have one for each language defined in _config.yml
├── 📂 _includes/: contains code parts that are included in the main HTML file
│   └── 📄 news.liquid: defines the news section layout in the about page
├── 📂 _layouts/: contains the layouts to choose from in the frontmatter of the Markdown files
Expand All @@ -42,11 +50,17 @@ The configuration file [\_config.yml](_config.yml) contains the main configurati
All changes made to this file are only visible after you rebuild the website. That means that you need to run `bundle exec jekyll serve --lsi` again if you are running the website locally or push your changes to GitHub if you are using GitHub Pages. All other changes are visible immediately, you only need to refresh the page.

## Displaying countries flags

To display countries flags instead of the language initials in the header, you can set `country_flag: true` in the [\_config.yml](_config.yml) file. You should also add the countries' svg flags in the [assets/img/flags/](assets/img/flags/) directory. You can find the flags in the [flag-icons repository](https://github.com/lipis/flag-icons/tree/main/flags). When selecting the flags, the code uses the last part (after the `-`) of the site languages. So when looking for the flag of the language `pt-br`, the code will look for the file `br.svg` in the [assets/img/flags/](assets/img/flags/) directory.

![Use country flag instead of language name](assets/img/readme_preview/country_flag.png)

## Modifying the CV information

There are currently 2 different ways of generating the CV page content. The first one is by using a json file located in [assets/json/resume.json](assets/json/resume.json). It is a [known standard](https://jsonresume.org/) for creating a CV programmatically. The second one, currently used as a fallback when the json file is not found, is by using a yml file located in [\_data/cv.yml](_data/cv.yml). This was the original way of creating the CV page content and since it is more human readable than a json file we decided to keep it as an option.
There are currently 2 different ways of generating the CV page content. The first one is by using a json file located in [assets/json/resume_LANG.json](assets/json/resume_en-us.json). It is a [known standard](https://jsonresume.org/) for creating a CV programmatically. The second one, currently used as a fallback when the json file is not found, is by using a yml file located in [\_data/LANG/cv.yml](_data/en-us/cv.yml). This was the original way of creating the CV page content and since it is more human readable than a json file we decided to keep it as an option.

What this means is, if there is no resume data defined in [\_config.yml](_config.yml) and loaded via a json file, it will load the contents of [\_data/cv.yml](_data/cv.yml). If you want to use the [\_data/cv.yml](_data/cv.yml) file as the source of your CV, you must delete the [assets/json/resume.json](assets/json/resume.json) file.
What this means is, if there is no resume data defined in [\_config.yml](_config.yml) and loaded via a json file, it will load the contents of [\_data/LANG/cv.yml](_data/en-us/cv.yml). If you want to use the [\_data/LANG/cv.yml](_data/en-us/cv.yml) file as the source of your CV, you must delete the [assets/json/resume_LANG.json](assets/json/resume_en-us.json) file.

## Modifying the user and repository information

Expand All @@ -58,7 +72,7 @@ You can create new pages by adding new Markdown files in the [\_pages](_pages/)

## Creating new blog posts

To create a new blog post, you can add a new Markdown file in the [\_posts](_posts/) directory. The [name of the file must follow](https://jekyllrb.com/docs/posts/#creating-posts) the format `YYYY-MM-DD-title.md`. The easiest way to do this is to copy an existing blog post and modify it. Note that some blog posts have optional fields in the [frontmatter](https://jekyllrb.com/docs/front-matter/) that are used to enable specific behaviors or functions.
To create a new blog post, you can add a new Markdown file in the [\_i18n/LANG/\_posts](_i18n/en-us/_posts/) directory. The [name of the file must follow](https://jekyllrb.com/docs/posts/#creating-posts) the format `YYYY-MM-DD-title.md`. The easiest way to do this is to copy an existing blog post and modify it. Note that some blog posts have optional fields in the [frontmatter](https://jekyllrb.com/docs/front-matter/) that are used to enable specific behaviors or functions.

If you want to create blog posts that are not ready to be published, but you want to track it with git, you can create a [\_drafts](https://jekyllrb.com/docs/posts/#drafts) directory and store them there.

Expand All @@ -68,7 +82,7 @@ You can create new projects by adding new Markdown files in the [\_projects](_pr

## Adding some news

You can add news in the about page by adding new Markdown files in the [\_news](_news/) directory. There are currently two types of news: inline news and news with a link. News with a link take you to a new page while inline news are displayed directly in the about page. The easiest way to create yours is to copy an existing news and modify it.
You can add news in the about page by adding new Markdown files in the [\_i18n/LANG/\_news](_i18n/en-us/_news/) directory. There are currently two types of news: inline news and news with a link. News with a link take you to a new page while inline news are displayed directly in the about page. The easiest way to create yours is to copy an existing news and modify it.

## Adding Collections

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:latest
ENV DEBIAN_FRONTEND noninteractive

Label MAINTAINER Amir Pourmand
Label MAINTAINER George Araújo

RUN apt-get update -y && apt-get install -y --no-install-recommends \
locales \
Expand Down
4 changes: 3 additions & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Frequently Asked Questions

Here are some frequently asked questions. If you have a different question, please check if it was not already answered in the Q&A section of the [GitHub Discussions](https://github.com/alshedivat/al-folio/discussions/categories/q-a). If not, feel free to ask a new question there.
Here are some frequently asked questions. If you have a different question, please check if it was not already answered in the Q&A section of the [GitHub Discussions](https://github.com/alshedivat/al-folio/discussions/categories/q-a) of the original al-folio. If not, feel free to ask a new question there.

If your question is related to localization, please check if it was not already answered in the Q&A section of the [GitHub Discussions](https://github.com/george-gca/multi-language-al-folio/discussions/categories/q-a). If not, feel free to ask a new question there.

- [After I create a new repository from this template and setup the repo, I get a deployment error. Isn't the website supposed to correctly deploy automatically?](#after-i-create-a-new-repository-from-this-template-and-setup-the-repo-i-get-a-deployment-error-isnt-the-website-supposed-to-correctly-deploy-automatically)
- [I am using a custom domain (e.g., `foo.com`). My custom domain becomes blank in the repository settings after each deployment. How do I fix that?](#i-am-using-a-custom-domain-eg-foocom-my-custom-domain-becomes-blank-in-the-repository-settings-after-each-deployment-how-do-i-fix-that)
Expand Down
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ group :jekyll_plugins do
gem 'jekyll-feed'
gem 'jekyll-get-json'
gem 'jekyll-imagemagick'
gem 'jekyll-jupyter-notebook'
# gem 'jekyll-jupyter-notebook'
gem 'jekyll-link-attributes'
gem 'jekyll-minifier'
gem 'jekyll-paginate-v2'
gem 'jekyll-polyglot'
gem 'jekyll-scholar'
gem 'jekyll-sitemap'
gem 'jekyll-toc'
Expand Down
Loading

0 comments on commit db3b671

Please sign in to comment.