Browse Source

Some more bits about continue_reading anchor

index-subcmd
Vincent Prouillet 6 years ago
parent
commit
e40e97711f
5 changed files with 12 additions and 4 deletions
  1. +3
    -0
      CHANGELOG.md
  2. +2
    -2
      components/site/src/lib.rs
  3. +3
    -0
      components/site/tests/site.rs
  4. +2
    -2
      docs/content/documentation/content/page.md
  5. +2
    -0
      test_site/content/posts/python.md

+ 3
- 0
CHANGELOG.md View File

@@ -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)



+ 2
- 2
components/site/src/lib.rs View File

@@ -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"),


+ 3
- 0
components/site/tests/site.rs View File

@@ -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]


+ 2
- 2
docs/content/documentation/content/page.md View File

@@ -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>`

+ 2
- 0
test_site/content/posts/python.md View File

@@ -6,6 +6,8 @@ date = 2017-03-01

Same filename but different path

<!-- more -->

{{ basic() }}

{{ pirate(name="Bob") }}


Loading…
Cancel
Save