Commit Graph

19 Commits

Author SHA1 Message Date
Maruan beb6f27d59
format code with prettier.io (#2048)
summary:
- adds prettier formatter configuration
- formats the entire repo using prettier, ignoring minified files
(`*.min.css`) and heavy generated html
- changes extensions of all `.html` files to `.liquid`, which is more
correct and necessary for prettier to work correctly
- replaces "%-" and "-%" with just "%" — manual liquid formatting using
minus signs is superfluous since we are compressing and minifying the
code anyway
- adds CI action for running prettier check on PR and pushes to master
2024-01-10 00:10:51 -05:00
Maruan 8893d483bc
Update giscus setup via github action (#1792)
giscus settings in `_config.yml` had al-folio repo specified by default.
many users kept these defaults in their own repos, which resulted in
getting comments from blog posts of different users posted to al-folio
discussions. this is undesirable, since users lose control over the
discussions in their blogs.

this PR solves the issue:
- first, we set `giscus.repo` to blank in `_config.yml`. if the field is
kept blank, when the website is built locally, the user will see a
warning saying that giscus comments are misconfigured.
- second, we add a step to the `deploy` workflow that writes repository
name to `giscus.repo` in `_config.yml`. that way, even if `giscus.repo`
field is left black or set to an incorrect repo, it gets correctly
populated at deployment time.

other small changes in this PR are small stylistic adjustments.
2023-10-04 22:27:36 -04:00
George 64cf57fab3
Added support to PurgeCSS (#1562)
Tackled #1329 with [PurgeCSS](https://purgecss.com/).

Being talking with @varuniyer about using
[jekyll-uncss](https://github.com/episource/jekyll-uncss) to reduce css
file sizes by ditching unused classes. This approach have 3 main
problems:

1 - have some limitations as pointed
[here](https://github.com/alshedivat/al-folio/issues/1329#issuecomment-1546517327)
2 - last update to
[jekyll-uncss](https://github.com/episource/jekyll-uncss) was about 3
years ago, so it might have a few issues
3 - [uncss](https://github.com/uncss/uncss) haven't seem a new release
in a while, currently [lacking
maintenance](https://github.com/uncss/uncss/issues/459), and using some
deprecated libraries as seem here:

```
npm install -g uncss
npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated w3c-hr-time@1.0.2: Use your platform's native performance.now() and performance.timeOrigin.
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
```

I thought about giving PurgeCSS a go, since it has been more [actively
maintaned](https://github.com/FullHuman/purgecss), but
[jekyll-purgecss](https://github.com/mhanberg/jekyll-purgecss) haven't.

For this, I needed to change to use some local libraries instead of
getting them via CDN. The good news is that it is quite effective in
reducing css file sizes. Comparing dir sizes with `du -hs
_site/assets/css/`:

| current | minify | PurgeCSS | PurgeCSS + minify |
| ------- | ------ | -------- | ----------------- |
| 1,1M    | 988K   | 456K     | 420K              |

---------

Signed-off-by: George Araujo <george.gcac@gmail.com>
2023-09-28 14:22:42 -03:00
George ab2f72baaa
Added support for jupyter notebooks #417 (#1511)
Implemented #417.

---------

Signed-off-by: George Araújo <george.gcac@gmail.com>
Co-authored-by: Amir Pourmand <pourmand1376@gmail.com>
2023-07-05 12:43:59 -03:00
Juan Carlos Niebles 6eebb65632
fixes #1497 (#1505) 2023-06-24 14:44:23 -03:00
ebohnenb 2f58bb909a
Update ruby to 3.2.2 in deploy.yml (#1459) 2023-06-10 21:18:47 -04:00
Scott Lee Chua 2f49d07dc3 Replace bin/deploy with GitHub Action (#1234)
This PR updates `deploy.yml` to use the GitHub Action [Deploy to GitHub Pages](https://github.com/marketplace/actions/deploy-to-github-pages).
2023-03-19 06:43:32 -04:00
Alireza Dehghanzadeh e2966c4114
New update to GH Actions: Deprecating `save-state` and `set-output` commands (#986)
Hi there

First of all, thanks for this amazing complete theme

Due to this warning which has been recently showed by Github,
`::set-output` will be deprecated and must be replaced with a new method


![image](https://user-images.githubusercontent.com/86428901/201933020-4a53d735-08b4-41d3-b38c-e16942fdd64e.png)

topic: [GitHub Actions: Deprecating save-state and set-output
commands](https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/)

Thanks
2022-11-15 19:30:22 +05:30
Rohan Deb Sarkar 9d7180417e
Better bundler caching for GitHub Actions (#750)
* Better caching for GitHub Actions

* Update `actions/checkout` to `v3`
2022-07-09 18:08:11 +05:30
Rohan Deb Sarkar e40bc98f47
Delete `travis.yml` (#665) 2022-05-12 13:40:21 -04:00
Maruan f7dd7f61c6
Call bash on bin/deploy in github actions (#625) 2022-04-03 12:55:12 -04:00
José M. Requena Plens 696894549b
Update deploy.yml (#436)
‘action’ is deprecated, change to ‘ruby’
https://github.com/ruby/setup-ruby
2021-10-29 21:31:46 -04:00
Maruan cd4b382799
Add jekyll-diagrams (#333)
* Add mermaid support via jekyll-diagrams

* Add mermaid install to deploy workflow
2021-10-03 21:26:29 -04:00
Amir Pourmand 6b0bf87846
add jekyll target blank plugin (#404)
* add jekyll target blank

* Remove manual target blank from everywhere

* Update README.md

* Set ruby version to 3.0.2 in the deploy script

Co-authored-by: Maruan Al-Shedivat <maruan@genesistherapeutics.ai>
2021-10-03 21:16:05 -04:00
Maik Wöhl 895063a625
Add 'main' branch for newer GitHub repositories (#389) 2021-09-08 00:48:20 -04:00
Neeraj Gangwar 4d5f2dccff
Use master for source code for personal/organization webpages and update the document (#344)
Co-authored-by: Neeraj Gangwar <neeraj.gangwar@myntra.com>
2021-07-17 12:55:43 -04:00
Maruan c437bf55bb
Set ruby version to 2.7 in the deploy workflow 2021-01-15 00:29:22 -05:00
Christoph Junghans c4be6f8457
social: add work url (#171)
* social: add work url

* Deploy: --dry-run -> --no-push
2021-01-05 09:37:57 -05:00
Christoph Junghans 625fb694d6
Github action: add deploy workflow (#163)
* Github action: add deploy workflow

* Update .github/workflows/deploy.yml

Co-authored-by: Maruan <alshedivat@users.noreply.github.com>
2021-01-04 20:09:20 -05:00