From b7f0267f93168f258616deebbc6a75463871ab1e Mon Sep 17 00:00:00 2001 From: George <31376482+george-gca@users.noreply.github.com> Date: Mon, 15 Jan 2024 11:09:45 -0300 Subject: [PATCH] Fix broken links (#2077) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/broken-links.yml | 18 ++++++++++++++++++ CUSTOMIZE.md | 8 ++++---- INSTALL.md | 4 ++-- _config.yml | 1 - _includes/projects.liquid | 1 - _layouts/about.liquid | 1 - _layouts/bib.liquid | 1 - _layouts/cv.liquid | 1 - _layouts/distill.liquid | 1 - _layouts/page.liquid | 1 - _layouts/post.liquid | 1 - _layouts/profiles.liquid | 1 - _posts/2018-12-22-distill.md | 2 -- 13 files changed, 24 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/broken-links.yml diff --git a/.github/workflows/broken-links.yml b/.github/workflows/broken-links.yml new file mode 100644 index 000000000000..524de8144d02 --- /dev/null +++ b/.github/workflows/broken-links.yml @@ -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' diff --git a/CUSTOMIZE.md b/CUSTOMIZE.md index a12533c01e2c..6c6a2071cd23 100644 --- a/CUSTOMIZE.md +++ b/CUSTOMIZE.md @@ -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 diff --git a/INSTALL.md b/INSTALL.md index 15741fe456d3..8a4ff070bd78 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -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 diff --git a/_config.yml b/_config.yml index 07a984768f36..bd37b85b309c 100644 --- a/_config.yml +++ b/_config.yml @@ -296,7 +296,6 @@ scholar: join_strings: true details_dir: bibliography - details_layout: bibtex.html details_link: Details query: "@*" diff --git a/_includes/projects.liquid b/_includes/projects.liquid index e8ceda734057..2fd7b7542af5 100644 --- a/_includes/projects.liquid +++ b/_includes/projects.liquid @@ -1,4 +1,3 @@ -
diff --git a/_layouts/about.liquid b/_layouts/about.liquid index 0a86ad451923..4d986f852bbb 100644 --- a/_layouts/about.liquid +++ b/_layouts/about.liquid @@ -1,7 +1,6 @@ --- layout: default --- -

diff --git a/_layouts/bib.liquid b/_layouts/bib.liquid index df06bca46298..72df52f1ee63 100644 --- a/_layouts/bib.liquid +++ b/_layouts/bib.liquid @@ -1,6 +1,5 @@ --- --- -
{% if site.enable_publication_thumbnails %}
diff --git a/_layouts/cv.liquid b/_layouts/cv.liquid index eb7e92ffba43..0ce33a0772db 100644 --- a/_layouts/cv.liquid +++ b/_layouts/cv.liquid @@ -1,7 +1,6 @@ --- layout: default --- - {% unless site.data.resume %}
diff --git a/_layouts/distill.liquid b/_layouts/distill.liquid index 202123b42aaa..45eeccc121df 100644 --- a/_layouts/distill.liquid +++ b/_layouts/distill.liquid @@ -1,5 +1,4 @@ - {% include head.liquid %} diff --git a/_layouts/page.liquid b/_layouts/page.liquid index a374c14a1c0f..d3c7aa24c7ce 100644 --- a/_layouts/page.liquid +++ b/_layouts/page.liquid @@ -1,7 +1,6 @@ --- layout: default --- -

{{ page.title }}

diff --git a/_layouts/post.liquid b/_layouts/post.liquid index b8c7276cd94c..1c5c52fc44e6 100644 --- a/_layouts/post.liquid +++ b/_layouts/post.liquid @@ -1,7 +1,6 @@ --- layout: default --- - {% assign year = page.date | date: '%Y' %} {% assign tags = page.tags | join: '' %} {% assign categories = page.categories | join: '' %} diff --git a/_layouts/profiles.liquid b/_layouts/profiles.liquid index 0759675675f1..e16ac2974d9d 100644 --- a/_layouts/profiles.liquid +++ b/_layouts/profiles.liquid @@ -1,7 +1,6 @@ --- layout: page --- -
{% if page.profiles %} diff --git a/_posts/2018-12-22-distill.md b/_posts/2018-12-22-distill.md index ae58f2b340b5..6fa2e8d8002b 100644 --- a/_posts/2018-12-22-distill.md +++ b/_posts/2018-12-22-distill.md @@ -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].