diff --git a/content/about/new-in-032/index.md b/content/about/new-in-032/index.md index 0ae93b557..41bd58937 100644 --- a/content/about/new-in-032/index.md +++ b/content/about/new-in-032/index.md @@ -126,15 +126,15 @@ Image operations in Hugo currently **do not preserve EXIF data** as this is not _The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pedersen](https://commons.wikimedia.org/wiki/User:Bep) (Creative Commons Attribution-Share Alike 4.0 International license)_ -{{< imgproc sunset Resize "300x" >}} +{{< imgproc sunset Resize "300x" />}} -{{< imgproc sunset Fill "90x120 left" >}} +{{< imgproc sunset Fill "90x120 left" />}} -{{< imgproc sunset Fill "90x120 right" >}} +{{< imgproc sunset Fill "90x120 right" />}} -{{< imgproc sunset Fit "90x90" >}} +{{< imgproc sunset Fit "90x90" />}} -{{< imgproc sunset Resize "300x q10" >}} +{{< imgproc sunset Resize "300x q10" />}} This is the shortcode used in the examples above: diff --git a/content/content-management/image-processing/index.md b/content/content-management/image-processing/index.md index 0bb32e6ec..d31f28dce 100644 --- a/content/content-management/image-processing/index.md +++ b/content/content-management/image-processing/index.md @@ -111,15 +111,15 @@ See https://github.com/disintegration/imaging for more. If you want to trade qua _The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pedersen](https://commons.wikimedia.org/wiki/User:Bep) (Creative Commons Attribution-Share Alike 4.0 International license)_ -{{< imgproc sunset Resize "300x" >}} +{{< imgproc sunset Resize "300x" />}} -{{< imgproc sunset Fill "90x120 left" >}} +{{< imgproc sunset Fill "90x120 left" />}} -{{< imgproc sunset Fill "90x120 right" >}} +{{< imgproc sunset Fill "90x120 right" />}} -{{< imgproc sunset Fit "90x90" >}} +{{< imgproc sunset Fit "90x90" />}} -{{< imgproc sunset Resize "300x q10" >}} +{{< imgproc sunset Resize "300x q10" />}} This is the shortcode used in the examples above: @@ -132,6 +132,10 @@ This is the shortcode used in the examples above: And it is used like this: ```html -{{}} +{{}} ``` + +{{% note %}} +**Tip:** Note the self-closing shortcode syntax above. The `imgproc` shortcode can be called both with and without **inner content**. +{{% /note %}} \ No newline at end of file diff --git a/content/content-management/organization/index.md b/content/content-management/organization/index.md index a5ec10abb..742a9e5fe 100644 --- a/content/content-management/organization/index.md +++ b/content/content-management/organization/index.md @@ -17,17 +17,24 @@ aliases: [/content/sections/] toc: true --- -{{< youtube 0GZxidrlaRM >}} - ## Page Bundles -See [This Page](/about/new-in-032/). We will get the relevant parts of the rest of the Hugo docs updated. Eventually. +Hugo `0.32` announced page-relative images and other resources packaged into `Page Bundles`. -{{< todo >}} -Remove the above when done. -{{< /todo >}} +These terms are connected, and you also need to read about [Page Resources]({{< relref "content-management/page-resources" >}}) and [Image Processing]({{< relref "content-management/image-processing" >}}) to get the full picture. + +{{% imgproc 1-featured Resize "300x" %}} +The illustration shows 3 bundles. Note that the home page bundle cannot contain other content pages, but other files (images etc.) are fine. +{{% /imgproc %}} + + +{{% note %}} +The bundle docuementation is **work in progress**. We will publish more comprehensive docs about this soon. +{{% /note %}} + + +# Organization of Content Source -## Organization of Content Source In Hugo, your content should be organized in a manner that reflects the rendered website. diff --git a/content/content-management/page-bundles.md b/content/content-management/page-bundles.md index 689178d89..7c5ca85d6 100644 --- a/content/content-management/page-bundles.md +++ b/content/content-management/page-bundles.md @@ -5,7 +5,7 @@ date : 2018-01-24T13:09:00-05:00 lastmod : 2018-01-28T22:26:40-05:00 linktitle : "Page Bundles" keywords : ["page", "bundle", "leaf", "branch"] -categories : ["content management", "bundle"] +categories : ["content management"] draft : true toc : true menu : diff --git a/layouts/shortcodes/imgproc.html b/layouts/shortcodes/imgproc.html index 1c42d4756..6ff73e1f9 100644 --- a/layouts/shortcodes/imgproc.html +++ b/layouts/shortcodes/imgproc.html @@ -14,6 +14,12 @@
- .{{ $command }} "{{ $options }}" + + {{ with .Inner }} + {{ . }} + {{ else }} + .{{ $command }} "{{ $options }}" + {{ end }} +
\ No newline at end of file diff --git a/resources/_gen/images/content-management/organization/1-featured-content-bundles_hu3e3ae7839b071119f32acaa20f204198_63640_300x0_resize_box_center.png b/resources/_gen/images/content-management/organization/1-featured-content-bundles_hu3e3ae7839b071119f32acaa20f204198_63640_300x0_resize_box_center.png new file mode 100644 index 000000000..7d29ca620 Binary files /dev/null and b/resources/_gen/images/content-management/organization/1-featured-content-bundles_hu3e3ae7839b071119f32acaa20f204198_63640_300x0_resize_box_center.png differ