Add warning for old style internal link + fix one

This commit is contained in:
Vincent Prouillet 2019-07-12 22:55:44 +02:00
parent d2a62153d7
commit f5c7b44027
3 changed files with 8 additions and 1 deletions

View file

@ -7,6 +7,7 @@
- Update livereload
- Add `hard_link_static` config option to hard link things in the static directory instead of copying
- Draft pages are not longer rendered
- Add warning for old style internal links since they would still function
## 0.8.0 (2019-06-22)

View file

@ -77,6 +77,12 @@ fn fix_link(
if link_type == LinkType::Email {
return Ok(link.to_string());
}
// TODO: remove me in a few versions when people have upgraded
if link.starts_with("./") && link.contains(".md") {
println!("It looks like the link `{}` is using the previous syntax for internal links: start with @/ instead", link);
}
// A few situations here:
// - it could be a relative link (starting with `@/`)
// - it could be a link to a co-located asset

View file

@ -150,4 +150,4 @@ Here is the result:
## Get image size
Sometimes when building a gallery it is useful to know the dimensions of each asset. You can get this information with
[get_image_metadata](./documentation/templates/overview.md#get-image-metadata)
[get_image_metadata](@/documentation/templates/overview.md#get-image-metadata)