Created a plugin to tackle #1181. Currently have an issue with tikzjax
since it imports some wasm file from its javascript. The rest should
work as expected.
---------
Signed-off-by: George Araujo <george.gcac@gmail.com>
This PR adds an "award" button to publications.
It takes the `award` value from the bibtex entry and displays(incl.
Markdown rendering) the text in a box similarly to abstract and bibtex.
User can set the entry `award_name` to configure the value. See example
config with `award_name: Nobel Prize`.
The color of the award box can be configured in `_base.scss`.
Note, there is a similar PR #2175, it I saw to issues with:
1. There was no progress
2. The award button just prints the text directly in the button,
similarly to `award_name`. Long award names could clutter the webpage.
3. IMHO, it brokes the current al-folio design, since butons do have a
fixed size/text. However, variable prize names are also possible with
this PR.
***
Pictures:
Default. Text are hidden:
<img width="708" alt="grafik"
src="https://github.com/alshedivat/al-folio/assets/1998723/1221c82c-c384-4297-807e-39385e2ce4fd">
Additional info is shown when the button is clicked. Markdown supported.
<img width="684" alt="grafik"
src="https://github.com/alshedivat/al-folio/assets/1998723/2354aeee-12b0-4d32-b194-5d2ea80d8363">
Only one text box shown at the same time, like it is with "ABS" and
"BIB":
<img width="691" alt="grafik"
src="https://github.com/alshedivat/al-folio/assets/1998723/d3937bb9-d9c2-47ac-b819-b92aec3d916a">
***
Feedback welcome.
You can also check [my
website](https://christianmainka.de/publications/awarded), which was the
base for this PR.
Now that Bluesky is [finally
available](https://fontawesome.com/changelog) at Font Awesome, we can
add it to the template.
---------
Signed-off-by: George Araujo <george.gcac@gmail.com>
This PR introduces an enhancement to the site's image-loading strategy
by implementing lazy loading as the default behavior for all images. The
motivation behind this change is to improve the site's load times.
**Changes:**
1. **Default Lazy Loading:** By `default`, all images will now have the
`loading="lazy"` attribute.
2. **Configurable Option in `_config.yml`:** Added a new configuration
option under `lazy_loading_images.enable`.
3. **Override Capability:** For `specific images` where the user doesn't
want lazy loading, they can `override` this by directly setting the
`loading attribute` in the `image tag`.
Moved libs versions and hashes to `_config.yml`.
Fixes#2067.
Deferring everything possible to keep pages loads fast.
---------
Signed-off-by: George Araújo <george.gcac@gmail.com>
The GitHub actions were running everytime a new commit was made to the
repo, but that wasn't needed. For example, we don't need to try to
create a new docker image if the libraries didn't change, same to build
the whole site after a change in the README.md.
---------
Signed-off-by: George Araújo <george.gcac@gmail.com>
Added GitHub action to check for broken links in repo before commit,
ignoring files with liquid tags since these were not yet processed and
also README since some sites created from this template doesn't have
valid urls anymore. Fixed some broken links in repo.
---------
Signed-off-by: George Araújo <george.gcac@gmail.com>
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
I decided to break the README file into different ones to declutter it
from the main page. Also adding some more explanation on the structure
of the template. Tackling #2032 and #2033
---------
Signed-off-by: George Araujo <george.gcac@gmail.com>
I had added -strip arg to the imagemagick call as it is generally
desirable to strip metadata from images before publishing them, however
it seems to occasionally cause issues with jekyll-imagemagick
auto-regeneration, regenerating images even when they have not changed.
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`
After deploying my website (Cloudflare Pages), my Giscus did not work, I
realized these two paramesters are removed. After adding them again, my
Giscus worked correctly.
These new values are values from previous commits of original repository
---------
Co-authored-by: Maruan Al-Shedivat <maruan@genesistherapeutics.ai>
When the video entry is added to bib:
e.g.,
```
{
...
video={https://www.youtube.com/embed/jNQXAC9IVRw}
...
}
```
A dedicated button appears for videos. When clicked, a playable video
appears under the research article (like abstracts and bibtex)
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.
#1569 Fixed mismatch between zotero-id in _config.yml and the zotero-id
called upon in the socials html file introduced by #1572 (sorry about
that; slipped in when I had to reset my zotero-branch)
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>