-
-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(template): refactor thumbnail support
BREAKING CHANGE: In this update the `svg-headline*` and `img-headline*` are deprecated and no longer available. You should use the new syntax `heading-img` for this feature, more info available on our project site.
- Loading branch information
Showing
7 changed files
with
108 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
layout: post | ||
title: Custom Heading Image | ||
category: note | ||
tags: curtana | ||
heading-img: svg/heading-image-example.svg | ||
heading-img-local: true | ||
--- | ||
|
||
This is an example of custom post heading image. You can simply add the following setting to your post [front-matter field](http://jekyllrb.com/docs/frontmatter/): | ||
|
||
```yaml | ||
heading-img: svg/svg-title-example.svg | ||
heading-img-local: true | ||
heading-img-width: 400 | ||
``` | ||
> In Almace Scaffolding v1.1.0, the original `svg-headline*`, and `img-headline*` options are deprecated. | ||
|
||
`heading-img` | ||
: Heading image filename, if a relative URL (non-external URL) is provided, the file will be prefixed with `site.file`. | ||
|
||
`heading-bg-local` | ||
: To avoid relative URL prefixed by `site.file`, you can set this option to `true` to prefix it with `amsf_user_assets`, then you can store your images in `_app/assets/`. | ||
|
||
`heading-img-width` | ||
: Set the width of your heading image. The value will be converted to viewport unit automatically. ie. `heading-img-width: 400` will be converted to `width: 40vw`; | ||
|
||
|
||
> **Pro Tips**: Keep a `<title>` tag for your SVG can help Safari generate correct post title for its Reader mode: | ||
|
||
```html | ||
<svg xmlns="http://www.w3.org/2000/svg"> | ||
<title>Cool Article</title> | ||
… | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.