-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is an internal link? #690
Comments
Hey @jpotier, an internal link leads to another page on the same hakyll website. An external link goes to a different domain. Hope this helps! |
Hey @jaspervdj this goes along my intuition, but is broken by my experience. If I run check as normal, some internal links are properly detected as broken:
If I run check with flag --internal-links:
It seems internal links are ignored. Hence my question: what is an internal link? What's the exact syntactic requirement for it being internal? |
So, I've been through the codebase and I'm still puzzled. I must be missing something obvious. I'll keep looking. |
The logic is pretty simple (but admittedly I haven't touched this part of the code in a while): |
I'll try and make a MWE showing the problem. Hopefully I'll bump into what I did wrong first :DD |
So, I've got something pretty small that shows my problem: site.hs: {-# LANGUAGE OverloadedStrings #-}
import Hakyll
main :: IO ()
main = do
hakyll $ do
match "about.md" $ do
route $ setExtension "html"
compile $ pandocCompiler
>>= loadAndApplyTemplate "templates/default.html" defaultContext
match "templates/*" $ compile templateBodyCompiler about.md: ---
title: Main title
---
Title
-------
Text
[External link](https://www.example.com)
[Internal link (valid)](./about.html)
[Internal link (broken)](./shoe-laces.html) template/default.html: <!DOCTYPE html>
<meta charset="UTF-8">
<html lang="en">
<head>
<meta charset="utf-8">
<title>MWE - $title$</title>
</head>
<body>
$title$
$body$
</body>
</html> The problem:
but
No error is displayed. I think it should show an error, since it's an internal link, and it's broken. Versions:
|
@jaspervdj can you reproduce this? |
Lines 167 to 175 in 1abdeee
It seems like if
This line just checks if we're supposed to check all links.
And if not, we don't check the link. Regardless of whether it's an internal or external link. Am I interpreting this code correctly? |
The
check --help
shows:If I use this, it seems to skip all links. So I tried to gather some documentation on what an internal link is, without much success. So my question is, what is an internal link?
The text was updated successfully, but these errors were encountered: