Skip to content

Commit

Permalink
Fix broken links (#2077)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
george-gca authored Jan 15, 2024
1 parent 0a737aa commit 71f054c
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 21 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/broken-links.yml
Original file line number Diff line number Diff line change
@@ -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'
8 changes: 4 additions & 4 deletions CUSTOMIZE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -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 %}

Expand All @@ -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 %}
```
Expand Down
1 change: 0 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ scholar:
join_strings: true

details_dir: bibliography
details_layout: bibtex.html
details_link: Details

query: "@*"
Expand Down
1 change: 0 additions & 1 deletion _includes/projects.liquid
Original file line number Diff line number Diff line change
@@ -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 %}">
Expand Down
1 change: 0 additions & 1 deletion _layouts/about.liquid
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
---
<!-- about.html -->
<div class="post">
<header class="post-header">
<h1 class="post-title">
Expand Down
1 change: 0 additions & 1 deletion _layouts/bib.liquid
Original file line number Diff line number Diff line change
@@ -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 %}">
Expand Down
1 change: 0 additions & 1 deletion _layouts/cv.liquid
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
---
<!-- _layouts/cv.html -->
{% unless site.data.resume %}
<div class="post">
<header class="post-header">
Expand Down
1 change: 0 additions & 1 deletion _layouts/distill.liquid
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<!doctype html>
<!-- _layouts/distill.html -->
<html>
<head>
{% include head.liquid %}
Expand Down
1 change: 0 additions & 1 deletion _layouts/page.liquid
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: default
---
<!-- page.html -->
<div class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title }}</h1>
Expand Down
1 change: 0 additions & 1 deletion _layouts/post.liquid
Original file line number Diff line number Diff line change
@@ -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: '' %}
Expand Down
1 change: 0 additions & 1 deletion _layouts/profiles.liquid
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
layout: page
---
<!-- about.html -->
<div class="post">
<article>
{% if page.profiles %}
Expand Down
2 changes: 0 additions & 2 deletions _posts/2018-12-22-distill.md
Original file line number Diff line number Diff line change
Expand Up @@ -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].
Expand Down

0 comments on commit 71f054c

Please sign in to comment.