Browse Source

Add warning for old style internal link + fix one

index-subcmd
Vincent Prouillet 5 years ago
parent
commit
f5c7b44027
3 changed files with 8 additions and 1 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +6
    -0
      components/rendering/src/markdown.rs
  3. +1
    -1
      docs/content/documentation/content/image-processing/index.md

+ 1
- 0
CHANGELOG.md 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)



+ 6
- 0
components/rendering/src/markdown.rs 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


+ 1
- 1
docs/content/documentation/content/image-processing/index.md 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)

Loading…
Cancel
Save