mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
Merge commit 'cb39847dee488c373dd5bc2a3706385342a59355'
This commit is contained in:
@@ -294,7 +294,7 @@ disableLatLong = false
|
||||
|
||||
## Smart Cropping of Images
|
||||
|
||||
By default, Hugo will use the [Smartcrop](https://github.com/muesli/smartcrop), a library created by [muesli](https://github.com/muesli), when cropping images with `.Fill`. You can set the anchor point manually, but in most cases the smart option will make a good choice. And we will work with the library author to improve this in the future.
|
||||
By default, Hugo will use [Smartcrop](https://github.com/muesli/smartcrop), a library created by [muesli](https://github.com/muesli), when cropping images with `.Fill`. You can set the anchor point manually, but in most cases the smart option will make a good choice. And we will work with the library author to improve this in the future.
|
||||
|
||||
An example using the sunset image from above:
|
||||
|
||||
|
@@ -18,8 +18,8 @@ Page Bundles are a way to group [Page Resources](/content-management/page-resour
|
||||
|
||||
A Page Bundle can be one of:
|
||||
|
||||
- Leaf Bundle (leaf means it has no children)
|
||||
- Branch Bundle (home page, section, taxonomy terms, taxonomy list)
|
||||
- Leaf Bundle (leaf means it has no children)
|
||||
- Branch Bundle (home page, section, taxonomy terms, taxonomy list)
|
||||
|
||||
| | Leaf Bundle | Branch Bundle |
|
||||
|-------------------------------------|----------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
|
@@ -72,7 +72,7 @@ Hugo provides a sensible default configuration of Related Content, but you can f
|
||||
|
||||
Without any `related` configuration set on the project, Hugo's Related Content methods will use the following.
|
||||
|
||||
```yaml
|
||||
{{< code-toggle file="config" >}}
|
||||
related:
|
||||
threshold: 80
|
||||
includeNewer: false
|
||||
@@ -82,7 +82,7 @@ related:
|
||||
weight: 100
|
||||
- name: date
|
||||
weight: 10
|
||||
```
|
||||
{{< /code-toggle >}}
|
||||
|
||||
Custom configuration should be set using the same syntax.
|
||||
|
||||
|
@@ -16,14 +16,12 @@ aliases: [/extras/highlighting/,/extras/highlight/,/tools/syntax-highlighting/]
|
||||
toc: true
|
||||
---
|
||||
|
||||
|
||||
Hugo uses [Chroma](https://github.com/alecthomas/chroma) as its code highlighter; it is built in Go and is really, really fast -- and for the most important parts compatible with Pygments we used before.
|
||||
|
||||
## Configure Syntax Highlighter
|
||||
|
||||
See [Configure Highlight](/getting-started/configuration-markup#highlight).
|
||||
|
||||
|
||||
## Generate Syntax Highlighter CSS
|
||||
|
||||
If you run with `pygmentsUseClasses=true` in your site config, you need a style sheet.
|
||||
@@ -36,7 +34,6 @@ hugo gen chromastyles --style=monokai > syntax.css
|
||||
|
||||
Run `hugo gen chromastyles -h` for more options. See https://xyproto.github.io/splash/docs/ for a gallery of available styles.
|
||||
|
||||
|
||||
## Highlight Shortcode
|
||||
|
||||
Highlighting is carried out via the [built-in shortcode](/content-management/shortcodes/) `highlight`. `highlight` takes exactly one required parameter for the programming language to be highlighted and requires a closing shortcode. Note that `highlight` is *not* used for client-side javascript highlighting.
|
||||
@@ -80,8 +77,6 @@ func GetTitleFunc(style string) func(s string) string {
|
||||
}
|
||||
{{< / highlight >}}
|
||||
|
||||
|
||||
|
||||
## Highlight Template Func
|
||||
|
||||
See [Highlight](/functions/highlight/).
|
||||
|
Reference in New Issue
Block a user