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
|
||||
- Now supports indented Sass syntax
|
||||
- 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)
|
||||
|
||||
|
|
|
@ -109,10 +109,10 @@ impl Site {
|
|||
|
||||
let site = Site {
|
||||
base_path: path.to_path_buf(),
|
||||
config: config,
|
||||
config,
|
||||
tera,
|
||||
pages: HashMap::new(),
|
||||
sections: HashMap::new(),
|
||||
tera: tera,
|
||||
live_reload: false,
|
||||
output_path: path.join("public"),
|
||||
static_path: path.join("static"),
|
||||
|
|
|
@ -198,6 +198,9 @@ fn can_build_site_with_live_reload() {
|
|||
|
||||
// no live reload code
|
||||
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]
|
||||
|
|
|
@ -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
|
||||
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
|
||||
for example:
|
||||
An anchor link to this position named `continue-reading` is created so you can link
|
||||
directly to it if needed for example:
|
||||
`<a href="{{ page.permalink }}#continue-reading">Continue Reading</a>`
|
||||
|
|
|
@ -6,6 +6,8 @@ date = 2017-03-01
|
|||
|
||||
Same filename but different path
|
||||
|
||||
<!-- more -->
|
||||
|
||||
{{ basic() }}
|
||||
|
||||
{{ pirate(name="Bob") }}
|
||||
|
|
Loading…
Reference in a new issue