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
Since the citation file and other stuff is already defined in
`_config.yml`, removed them when calling `{% bibliography %}`. Also
realized that `jekyll-scholar` helps in displaying only the papers cited
in page, changed to use that.
Signed-off-by: George Araújo <george.gcac@gmail.com>
Fixes#1967
Update the way responsive images are used to only use one srcset, and
add corresponding `sizes` attribute to the relevant layouts and
templates.
I did not go through and add `sizes` to all the example posts/projects.
When `sizes` is not specified by the user, the `figure.html` template
defaults to 95% the width of the viewport which should work fine for
most cases; users can optimize further if they wish by feeding `sizes`
into the template.
Additionally:
- Enabled support for .gif to .webp compression
- fix error in jekyll-imagemagick config where all images were resized
to be 800px or less. (for example img-1400.webp was actually only 800px
wide, etc.)
- added note about making sure imagemagick is installed before enabling
it in responsive images section of `_config.yml`
This patch checks, if the title of the current page matches with the
title of a submenu child. If so, it sets the submenu and the
corresponding child as active, highlighting it in the header.
Fixes#1952 by updating font awesome version. Also updated icons names
to newest font awesome style.
---------
Signed-off-by: George Araujo <george.gcac@gmail.com>
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.
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>
When the WeChat icon in socials is clicked, a picture of your WeChat QR
code is shown in the center of the screen. The actual picture of your QR
code has to be uploaded.
Addressing #1395 but with a different solution from #1478, using
semantic versioning based on implementation found
[here](https://distresssignal.org/busting-css-cache-with-jekyll-md5-hash).
Implemented a way of calculating the hash for both a single file or
directory. This way we can calculate the hash for when there is a change
in the `_sass` dir, for example, or in the contents of a single file.
Examples of generated outputs of the plugin:
```
/al-folio/assets/css/main.css?d41d8cd98f00b204e9800998ecf8427e
/al-folio/assets/js/theme.js?96d6b3e1c3604aca8b6134c7afdd5db6
/al-folio/assets/js/dark_mode.js?9b17307bb950ffa2e34be0227f53558f
/al-folio/assets/js/no_defer.js?d633890033921b33e0ceb13d22340a9c
/al-folio/assets/js/common.js?acdb9690d7641b2f8d40529018c71a01
/al-folio/assets/js/copy_code.js?c9d9dd48933de3831b3ee5ec9c209cac
/al-folio/assets/img/prof_pic.jpg?974957d202f671e4fa6700c04e68deae
```
Signed-off-by: George Araujo <george.gcac@gmail.com>
Solving #1569
I added Zotero socials because I needed them; opened a issue/pull
request in case I'm not the only one.
Second pull request (previous: #1570 ) because unwanted commits
retroactively crept in somehow. It was easier to force reset (which
closed the pull request automatically apparently).
Just as discussed in #1513 , this pull request adds support for
[jsonresume](https://jsonresume.org/). Create the resume once, either as
a file in the repository or at [github gist](https://gist.github.com/)
called `resume.json`. Put the file in the `_config.yaml` file and that's
it! Other platforms like [resumake](https://latexresu.me/) use the same
schema.
I also incorperated the changes introduced by #1339 to the best of my
abilites. The style could be further improved.
**Please merge this pull request after #1339 is merged, due to
dependencies from it**
If someone has a bettet approach on how to solve the problem that each
section needs its own template, please let me know. But for now it works
fine and is still backwards compatible with the `cv.yaml` file.
Co-authored-by: George <31376482+george-gca@users.noreply.github.com>
Fixes#1450, and the behavior of the site with this "new" code is shown
in the Expected behavior screenshots there.
I copy-pasted the redirect logic from `blog/index.html` into
`_includes/latest_posts.html`, with minor name changes.
I also cleaned up a line in `blog/index.html`.
When the dark mode is default, or if you set the page to dark mode and
then refresh, the content in "General Information" can't be seen.
This PR fixes the problem.
Since #1253 has been hanging there for a while, I decided to part from
it and add audio and video support.
---------
Signed-off-by: George Araujo <george.gcac@gmail.com>
The bibliography filename `papers.bib` is hard coded in templates, and
the equivalent setting in `_config.yml` is not used anywhere. So
changing the bib filename in `_config.yml` won't have any effects.
This PR replaces hard-coded filenames with the value from `_config.yml`.
Since, a image file will always contain a dot and a three letter
extension at least (ex: `.jpg`, `.png`, `.jpeg`, etc). Therefore we can
safely set the limit up to 4.
fixes#1096
fixes#993
Also added links to news and publications from respective section
headers on the home page. Changed the colors of the header links to make
it consistent with the previous look.