Fix broken links (#2077)

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>
This commit is contained in:
George 2024-01-15 11:09:45 -03:00 committed by GitHub
parent 0a737aa022
commit 71f054c82e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 28 additions and 21 deletions

18
.github/workflows/broken-links.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: Check for broken links
on:
push:
pull_request:
jobs:
link-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Link Checker 🔗
uses: lycheeverse/lychee-action@v1.9.0
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'

View File

@ -8,7 +8,6 @@ The project is structured as follows, focusing on the main components that you w
```txt
.
├── 📄 404.html: 404 page (page not found)
├── 📂 assets/: contains the assets that are displayed in the website
│   └── 📂 json/
│   └── 📄 resume.json: CV in JSON format (https://jsonresume.org/)
@ -19,10 +18,11 @@ The project is structured as follows, focusing on the main components that you w
│   ├── 📄 cv.yml: CV in YAML format, used when assets/json/resume.json is not found
│   └── 📄 repositories.yml: users and repositories info in YAML format
├── 📂 _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
├── 📂 _news/: the news that will appear in the news section in the about page
├── 📄 news.html: defines the news section layout in the about page
├── 📂 _pages/: contains the pages of the website that are shown in the header
├── 📂 _pages/: contains the pages of the website
| └── 📄 404.md: 404 page (page not found)
├── 📂 _posts/: contains the blog posts
├── 📂 _projects/: contains the projects
└── 📂 _sass/: contains the SASS files that define the style of the website
@ -136,7 +136,7 @@ There are several custom bibtex keywords that you can use to affect how the entr
- `supp`: Adds a "Supp" button to a specified file (if a full link is not specified, the file will be assumed to be placed in the /assets/pdf/ directory)
- `website`: Adds a "Website" button redirecting to the specified link
You can implement your own buttons by editing the [\_layouts/bib.html](_layouts/bib.html) file.
You can implement your own buttons by editing the [\_layouts/bib.liquid](_layouts/bib.liquid) file.
## Changing theme color

View File

@ -34,7 +34,7 @@ $ docker compose pull
$ docker compose up
```
Note that when you run it for the first time, it will download a docker image of size 400MB or so. To see the template running, open your browser and go to [http://localhost:8888](http://localhost:8888). You should see a copy of the theme's demo website.
Note that when you run it for the first time, it will download a docker image of size 400MB or so. To see the template running, open your browser and go to `http://localhost:8888`. You should see a copy of the theme's demo website.
Now, feel free to customize the theme however you like (don't forget to change the name!). After you are done, you can use the same command (`docker compose up`) to render the webpage with all you changes. Also, make sure to commit your final changes.
@ -70,7 +70,7 @@ $ pip install jupyter
$ bundle exec jekyll serve --lsi
```
To see the template running, open your browser and go to [http://localhost:4000](http://localhost:4000). You should see a copy of the theme's [demo website](https://alshedivat.github.io/al-folio/). Now, feel free to customize the theme however you like. After you are done, remember to **commit** your final changes.
To see the template running, open your browser and go to `http://localhost:4000`. You should see a copy of the theme's [demo website](https://alshedivat.github.io/al-folio/). Now, feel free to customize the theme however you like. After you are done, remember to **commit** your final changes.
## Deployment

View File

@ -296,7 +296,7 @@ Photo formatting is made simple using [Bootstrap's grid system](https://getboots
<p align="center">
<a href="https://alshedivat.github.io/al-folio/projects/1_project/">
<img src="https://raw.githubusercontent.com/alshedivat/al-folio/master/assets/img/photos-screenshot.png" width="75%">
<img src="assets/img/readme_preview/photos-screenshot.png" width="75%">
</a>
</p>
@ -318,7 +318,7 @@ You may also use the following codes for displaying this in any other pages.
<!-- code for GitHub users -->
{% if site.data.repositories.github_users %}
<div class="repositories d-flex flex-wrap flex-md-row flex-column justify-content-between align-items-center">
{% for user in site.data.repositories.github_users %} {% include repository/repo_user.html username=user %} {% endfor %}
{% for user in site.data.repositories.github_users %} {% include repository/repo_user.liquid username=user %} {% endfor %}
</div>
{% endif %}
@ -327,14 +327,14 @@ You may also use the following codes for displaying this in any other pages.
<h4>{{ user }}</h4>
{% endif %}
<div class="repositories d-flex flex-wrap flex-md-row flex-column justify-content-between align-items-center">
{% include repository/repo_trophies.html username=user %}
{% include repository/repo_trophies.liquid username=user %}
</div>
{% endfor %} {% endif %}
<!-- code for GitHub repositories -->
{% if site.data.repositories.github_repos %}
<div class="repositories d-flex flex-wrap flex-md-row flex-column justify-content-between align-items-center">
{% for repo in site.data.repositories.github_repos %} {% include repository/repo.html repository=repo %} {% endfor %}
{% for repo in site.data.repositories.github_repos %} {% include repository/repo.liquid repository=repo %} {% endfor %}
</div>
{% endif %}
```

View File

@ -291,7 +291,6 @@ scholar:
join_strings: true
details_dir: bibliography
details_layout: bibtex.html
details_link: Details
query: "@*"

View File

@ -1,4 +1,3 @@
<!-- _includes/projects.html -->
<div class="grid-sizer"></div>
<div class="grid-item">
<a href="{% if project.redirect %}{{ project.redirect }}{% else %}{{ project.url | relative_url }}{% endif %}">

View File

@ -1,7 +1,6 @@
---
layout: default
---
<!-- about.html -->
<div class="post">
<header class="post-header">
<h1 class="post-title">

View File

@ -1,6 +1,5 @@
---
---
<!-- _layouts/bib.html -->
<div class="row">
{% if site.enable_publication_thumbnails %}
<div class="col-sm-2 {% if entry.preview %}preview{% else %}abbr{% endif %}">

View File

@ -1,7 +1,6 @@
---
layout: default
---
<!-- _layouts/cv.html -->
{% unless site.data.resume %}
<div class="post">
<header class="post-header">

View File

@ -1,5 +1,4 @@
<!doctype html>
<!-- _layouts/distill.html -->
<html>
<head>
{% include head.liquid %}

View File

@ -1,7 +1,6 @@
---
layout: default
---
<!-- page.html -->
<div class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>

View File

@ -1,7 +1,6 @@
---
layout: default
---
<!-- _layouts/post.html -->
{% assign year = page.date | date: '%Y' %}
{% assign tags = page.tags | join: '' %}
{% assign categories = page.categories | join: '' %}

View File

@ -1,7 +1,6 @@
---
layout: page
---
<!-- about.html -->
<div class="post">
<article>
{% if page.profiles %}

View File

@ -248,8 +248,6 @@ Strikethrough uses two tildes. ~~Scratch this.~~
[I'm a reference-style link][Arbitrary case-insensitive reference text]
[I'm a relative reference to a repository file](../blob/master/LICENSE)
[You can use numbers for reference-style link definitions][1]
Or leave it empty and use the [link text itself].