Some more bits about continue_reading anchor
This commit is contained in:
parent
4c6e6c721f
commit
e40e97711f
|
@ -9,6 +9,9 @@ to the public directory
|
||||||
- Do not require themes to have a static folder
|
- Do not require themes to have a static folder
|
||||||
- Now supports indented Sass syntax
|
- Now supports indented Sass syntax
|
||||||
- Add search index building
|
- Add search index building
|
||||||
|
- Update Tera: now has `break` and `continue` in loops
|
||||||
|
- Gutenberg now creates an anchor link at the position of the `<!-- more -->` tag if you
|
||||||
|
want to link directly to it
|
||||||
|
|
||||||
## 0.3.2 (2018-03-05)
|
## 0.3.2 (2018-03-05)
|
||||||
|
|
||||||
|
|
|
@ -109,10 +109,10 @@ impl Site {
|
||||||
|
|
||||||
let site = Site {
|
let site = Site {
|
||||||
base_path: path.to_path_buf(),
|
base_path: path.to_path_buf(),
|
||||||
config: config,
|
config,
|
||||||
|
tera,
|
||||||
pages: HashMap::new(),
|
pages: HashMap::new(),
|
||||||
sections: HashMap::new(),
|
sections: HashMap::new(),
|
||||||
tera: tera,
|
|
||||||
live_reload: false,
|
live_reload: false,
|
||||||
output_path: path.join("public"),
|
output_path: path.join("public"),
|
||||||
static_path: path.join("static"),
|
static_path: path.join("static"),
|
||||||
|
|
|
@ -198,6 +198,9 @@ fn can_build_site_with_live_reload() {
|
||||||
|
|
||||||
// no live reload code
|
// no live reload code
|
||||||
assert!(file_contains!(public, "index.html", "/livereload.js?port=1112&mindelay=10"));
|
assert!(file_contains!(public, "index.html", "/livereload.js?port=1112&mindelay=10"));
|
||||||
|
|
||||||
|
// the summary anchor link has been created
|
||||||
|
assert!(file_contains!(public, "posts/python/index.html", r#"<a name="continue-reading"></a>"#));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -78,6 +78,6 @@ To do so, add `<!-- more -->` in your content at the point where you want the
|
||||||
summary to end and the content up to that point will be also available separately
|
summary to end and the content up to that point will be also available separately
|
||||||
in the [template](./documentation/templates/pages-sections.md#page-variables).
|
in the [template](./documentation/templates/pages-sections.md#page-variables).
|
||||||
|
|
||||||
An anchor link to this position is created so you can link directly to it if needed
|
An anchor link to this position named `continue-reading` is created so you can link
|
||||||
for example:
|
directly to it if needed for example:
|
||||||
`<a href="{{ page.permalink }}#continue-reading">Continue Reading</a>`
|
`<a href="{{ page.permalink }}#continue-reading">Continue Reading</a>`
|
||||||
|
|
|
@ -6,6 +6,8 @@ date = 2017-03-01
|
||||||
|
|
||||||
Same filename but different path
|
Same filename but different path
|
||||||
|
|
||||||
|
<!-- more -->
|
||||||
|
|
||||||
{{ basic() }}
|
{{ basic() }}
|
||||||
|
|
||||||
{{ pirate(name="Bob") }}
|
{{ pirate(name="Bob") }}
|
||||||
|
|
Loading…
Reference in a new issue