-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
56 changed files
with
1,490 additions
and
390 deletions.
There are no files selected for viewing
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<!-- markdownlint-disable-next-line --> | ||
<div align="center"> | ||
|
||
<!-- markdownlint-disable-next-line --> | ||
# Chirpy Jekyll Theme | ||
|
||
A minimal, responsive, and feature-rich Jekyll theme for technical writing. | ||
|
||
[![CI](https://img.shields.io/github/actions/workflow/status/cotes2020/jekyll-theme-chirpy/ci.yml?logo=github)][ci] | ||
[![Codacy Badge](https://img.shields.io/codacy/grade/4e556876a3c54d5e8f2d2857c4f43894?logo=codacy)][codacy] | ||
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy?color=goldenrod)][license] | ||
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?&logo=RubyGems&logoColor=ghostwhite&label=gem&color=orange)][gem] | ||
[![Open in Dev Containers](https://img.shields.io/badge/Dev_Containers-Open-deepskyblue?logo=linuxcontainers)][open-container] | ||
|
||
[**Live Demo** →][demo] | ||
|
||
[![Devices Mockup](https://chirpy-img.netlify.app/commons/devices-mockup.png)][demo] | ||
|
||
</div> | ||
|
||
## Features | ||
|
||
- Dark Theme | ||
- Localized UI language | ||
- Pinned Posts on Home Page | ||
- Hierarchical Categories | ||
- Trending Tags | ||
- Table of Contents | ||
- Last Modified Date | ||
- Syntax Highlighting | ||
- Mathematical Expressions | ||
- Mermaid Diagrams & Flowcharts | ||
- Dark Mode Images | ||
- Embed Media | ||
- Comment Systems | ||
- Built-in Search | ||
- Atom Feeds | ||
- PWA | ||
- Web Analytics | ||
- SEO & Performance Optimization | ||
|
||
## Documentation | ||
|
||
To learn how to use, develop, and upgrade the project, please refer to the [Wiki][wiki]. | ||
|
||
## Contributing | ||
|
||
Contributions (_pull requests_, _issues_, and _discussions_) are what make the open-source community such an amazing place | ||
to learn, inspire, and create. Any contributions you make are greatly appreciated. | ||
For details, see the "[Contributing Guidelines][contribute-guide]". | ||
|
||
## Credits | ||
|
||
### Contributors | ||
|
||
Thanks to [all the contributors][contributors] involved in the development of the project! | ||
|
||
[![all-contributors](https://contrib.rocks/image?repo=cotes2020/jekyll-theme-chirpy&columns=16)][contributors] | ||
<sub> — Made with [contrib.rocks](https://contrib.rocks)</sub> | ||
|
||
### Third-Party Assets | ||
|
||
This project is built on the [Jekyll][jekyllrb] ecosystem and some [great libraries][lib], and is developed using [VS Code][vscode] as well as tools provided by [JetBrains][jetbrains] under a non-commercial open-source software license. | ||
|
||
The avatar and favicon for the project's website are from [ClipartMAX][clipartmax]. | ||
|
||
## License | ||
|
||
This project is published under [MIT License][license]. | ||
|
||
[gem]: https://rubygems.org/gems/jekyll-theme-chirpy | ||
[ci]: https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml?query=event%3Apush+branch%3Amaster | ||
[codacy]: https://app.codacy.com/gh/cotes2020/jekyll-theme-chirpy/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade | ||
[license]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE | ||
[open-container]: https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/cotes2020/jekyll-theme-chirpy | ||
[jekyllrb]: https://jekyllrb.com/ | ||
[clipartmax]: https://www.clipartmax.com/middle/m2i8b1m2K9Z5m2K9_ant-clipart-childrens-ant-cute/ | ||
[demo]: https://cotes2020.github.io/chirpy-demo/ | ||
[wiki]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki | ||
[contribute-guide]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md | ||
[contributors]: https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors | ||
[lib]: https://github.com/cotes2020/chirpy-static-assets | ||
[vscode]: https://code.visualstudio.com/ | ||
[jetbrains]: https://www.jetbrains.com/?from=jekyll-theme-chirpy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,176 @@ | ||
<!-- markdownlint-disable-next-line --> | ||
<div align="center"> | ||
# 42AI - Github Pages | ||
|
||
<!-- markdownlint-disable-next-line --> | ||
# Chirpy Jekyll Theme | ||
<img | ||
style="display: block; | ||
margin-left: auto; | ||
margin-right: auto; | ||
width: 36%;" | ||
src="assets/img/logo/logo_bg_white.png" | ||
alt="42Artificial Intelligence logo"> | ||
</img> | ||
|
||
A minimal, responsive, and feature-rich Jekyll theme for technical writing. | ||
## Github pages using Jekyll with Chirpy template | ||
|
||
[![CI](https://img.shields.io/github/actions/workflow/status/cotes2020/jekyll-theme-chirpy/ci.yml?logo=github)][ci] | ||
[![Codacy Badge](https://img.shields.io/codacy/grade/4e556876a3c54d5e8f2d2857c4f43894?logo=codacy)][codacy] | ||
[![GitHub license](https://img.shields.io/github/license/cotes2020/jekyll-theme-chirpy?color=goldenrod)][license] | ||
[![Gem Version](https://img.shields.io/gem/v/jekyll-theme-chirpy?&logo=RubyGems&logoColor=ghostwhite&label=gem&color=orange)][gem] | ||
[![Open in Dev Containers](https://img.shields.io/badge/Dev_Containers-Open-deepskyblue?logo=linuxcontainers)][open-container] | ||
|
||
[**Live Demo** →][demo] | ||
|
||
[![Devices Mockup](https://chirpy-img.netlify.app/commons/devices-mockup.png)][demo] | ||
|
||
</div> | ||
### What is that ? | ||
|
||
## Features | ||
The present website has been created using the following dependencies : | ||
|
||
- Dark Theme | ||
- Localized UI language | ||
- Pinned Posts on Home Page | ||
- Hierarchical Categories | ||
- Trending Tags | ||
- Table of Contents | ||
- Last Modified Date | ||
- Syntax Highlighting | ||
- Mathematical Expressions | ||
- Mermaid Diagrams & Flowcharts | ||
- Dark Mode Images | ||
- Embed Media | ||
- Comment Systems | ||
- Built-in Search | ||
- Atom Feeds | ||
- PWA | ||
- Web Analytics | ||
- SEO & Performance Optimization | ||
#### Jekyll | ||
|
||
## Documentation | ||
> Jekyll is a static site generator (SSG) written in Ruby. It allows developers to build fast, secure, and scalable websites without the need for a dynamic web application server. Jekyll takes plain text files (Markdown, HTML, CSS, etc.) and transforms them into a static website, ready to be served by a web server. | ||
To learn how to use, develop, and upgrade the project, please refer to the [Wiki][wiki]. | ||
- [Jekyll's website](https://jekyllrb.com) | ||
- [Jekyll's documentation](https://jekyllrb.com/doc) | ||
|
||
## Contributing | ||
Knowledge about the following will be useful in using and manipulating the template: | ||
|
||
Contributions (_pull requests_, _issues_, and _discussions_) are what make the open-source community such an amazing place | ||
to learn, inspire, and create. Any contributions you make are greatly appreciated. | ||
For details, see the "[Contributing Guidelines][contribute-guide]". | ||
- [Front Matter](https://jekyllrb.com/docs/front-matter/) | ||
|
||
## Credits | ||
- [Jinja](https://jinja.palletsprojects.com/en/3.1.x/intro/) | ||
|
||
### Contributors | ||
> Jinja is a fast, expressive, extensible templating engine. Special placeholders in the template allow writing code similar to Python syntax. Then the template is passed data to render the final document. | ||
Thanks to [all the contributors][contributors] involved in the development of the project! | ||
#### Chirpy theme for Jekyll | ||
|
||
[![all-contributors](https://contrib.rocks/image?repo=cotes2020/jekyll-theme-chirpy&columns=16)][contributors] | ||
<sub> — Made with [contrib.rocks](https://contrib.rocks)</sub> | ||
> "A minimal, responsive, and feature-rich Jekyll theme for technical writing. Open source and hosted on GitHub since 2019." | ||
### Third-Party Assets | ||
[Chirpy template](/Chirpy-README.md) | ||
|
||
This project is built on the [Jekyll][jekyllrb] ecosystem and some [great libraries][lib], and is developed using [VS Code][vscode] as well as tools provided by [JetBrains][jetbrains] under a non-commercial open-source software license. | ||
|
||
The avatar and favicon for the project's website are from [ClipartMAX][clipartmax]. | ||
#### The `polyglot` plugin for Jekyll | ||
|
||
## License | ||
> "Polyglot is a fast, painless, open-source internationalization plugin for Jekyll blogs." | ||
This project is published under [MIT License][license]. | ||
- [The `polyglot` plugin on GitHub](https://github.com/untra/polyglot) | ||
|
||
[gem]: https://rubygems.org/gems/jekyll-theme-chirpy | ||
[ci]: https://github.com/cotes2020/jekyll-theme-chirpy/actions/workflows/ci.yml?query=event%3Apush+branch%3Amaster | ||
[codacy]: https://app.codacy.com/gh/cotes2020/jekyll-theme-chirpy/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade | ||
[license]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/LICENSE | ||
[open-container]: https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/cotes2020/jekyll-theme-chirpy | ||
[jekyllrb]: https://jekyllrb.com/ | ||
[clipartmax]: https://www.clipartmax.com/middle/m2i8b1m2K9Z5m2K9_ant-clipart-childrens-ant-cute/ | ||
[demo]: https://cotes2020.github.io/chirpy-demo/ | ||
[wiki]: https://github.com/cotes2020/jekyll-theme-chirpy/wiki | ||
[contribute-guide]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/docs/CONTRIBUTING.md | ||
[contributors]: https://github.com/cotes2020/jekyll-theme-chirpy/graphs/contributors | ||
[lib]: https://github.com/cotes2020/chirpy-static-assets | ||
[vscode]: https://code.visualstudio.com/ | ||
[jetbrains]: https://www.jetbrains.com/?from=jekyll-theme-chirpy | ||
<br/> | ||
|
||
## About deploying on Github pages using this setup | ||
|
||
Check out the following links if you are new to this setup: | ||
- [Configuration d'un site GitHub Pages avec Jekyll](https://docs.github.com/fr/pages/setting-up-a-github-pages-site-with-jekyll) | ||
- [Création d’un site GitHub Pages avec Jekyll](https://docs.github.com/fr/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll) | ||
- [Jekyll documentation for deployment on Github Pages](https://jekyllrb.com/docs/github-pages/) | ||
|
||
#### Automatic deployment via GitHub Actions worflow | ||
|
||
See files in the `.github/worflows/` folders. | ||
|
||
In the current state, any push on the main branch triggers the deployment to github pages. | ||
|
||
<br/> | ||
|
||
## Important points regarding Jekyll template adaptations | ||
|
||
Please make sure you have read and understood the [Chirpy documentation](https://jekyllrb.com/doc) | ||
|
||
### Logic | ||
|
||
#### Site configuration variables : `/locales/` | ||
|
||
See the following files : | ||
|
||
``` | ||
/locales/_config.yml | ||
/locales/authors.yml | ||
/locales/contact.yml | ||
/locales/share.yml | ||
<!-- language-dependent template variables --> | ||
/locales/en.yml | ||
/locales/fr.yml | ||
``` | ||
#### Site structure : `_tabs/` | ||
|
||
The `markdown` files in the `_tabs` folder populate the Menu in the sidebar on the left (based on their 'title' and 'lang' attributes) | ||
|
||
> See specific README for the `_tabs` folder in [the dedicated file](_tabs/README.md) | ||
These markdown files only contain the templates for the page. The variables for each page are injected into the template. They are stored in the `/locales/tabs/` folder. | ||
|
||
#### Site structure content : `_locales/tabs/` | ||
|
||
All the text from the TABS folder pages, in YAML, kept in one place to facilitate multilingual support and consistency between languages, and be separated from template files. | ||
|
||
One file per tab is enough. If you want to add multilingual support for this tab, you will need to modify this yml file accordingly. | ||
|
||
See example file : `[_locales/tabs/learning.yml](_locales/tabs/learning.yml) | ||
|
||
#### Site publishing content : `_posts/` | ||
|
||
"Publishing content" refers to dynamic contents such as blog posts or announcements. | ||
|
||
> See specific README for the `_posts` folder in [the dedicated file](_posts/README.md) | ||
#### Style | ||
|
||
A lot of minimal style adjustments have been made to the original chirpy template. | ||
Most of these modifications are indicated within the code into **commented lines** containing the ```"42AI"``` mention. | ||
Templates modified are mostly from the `_includes` folder containing the root HTML files used. | ||
|
||
Also : | ||
|
||
<details> | ||
<summary>Table of Contents (TOC)</summary> | ||
|
||
For a page to display a TOC, it must contain at least a H2 or smaller tag amd ***be of type `layout: post`.*** | ||
Its Front Matter config must also contain the following: | ||
|
||
> ```toc: true``` | ||
</details> | ||
<details> | ||
<summary>Post Metadata</summary> | ||
|
||
An extra attribute has been added to the Front Matter config for pages of type `layout: post` to ***distinguish between site structure pages (ie: `TABS`, no post metadata required) and publications*** such as blog posts or announcements which require to display the publication's metadata. | ||
|
||
> ```display_metadata: true/false``` | ||
</details> | ||
|
||
#### Internationalization | ||
|
||
In the current version, 42AI's github page supports two languages : French (default) and English. See `_config.yml`. | ||
|
||
The polyglot gem for Chirpy works as a charm, but requires a few adaptations. Important points to take into consideration here are the following : | ||
|
||
- Site global variables per language are accessible at the root of the `locales` folder : | ||
- `/locales/fr.yml` | ||
- `/locales/en.yml` | ||
|
||
- For each page you want translated: | ||
- you need to create a duplicate file in the same folder, adding the `-en` suffix for an english file. | ||
|
||
Example : | ||
``` | ||
!ls /_tabs/ | ||
42students.md # Default French version file | ||
42students-en.md # English version file | ||
``` | ||
|
||
- configure its YAML Front Matter header according to your needs | ||
|
||
**Current language code is accessible in template via the variable ```site.active_lang```.** | ||
|
||
### Build locally | ||
|
||
#### Requirements | ||
|
||
- ruby | ||
- bundle | ||
- jekyll | ||
|
||
Then | ||
|
||
```bundle exec jekyll serve``` | ||
|
||
## TODO | ||
|
||
- TAB on images | ||
- CSS color adjustments on dark theme for higher contrast on some elements | ||
- ~~README contribution blog~~ | ||
- README for `TABS` | ||
- Reorganize messed up alumni variables and create alumni section on team page | ||
- Refacto to prevent multiple files in tabs folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.