Skip to content

Commit

Permalink
swagger: remove shortcode #847
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Apr 26, 2024
1 parent bd3a403 commit aed8845
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
12 changes: 7 additions & 5 deletions exampleSite/content/basics/migration/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,22 @@ This document shows you what's new in the latest release and flags it with one o
--CODE-theme: monokai;
````

- {{% badge style="warning" title=" " %}}Breaking{{% /badge %}} Search support for the deprecated outputformat `json` was removed.

Change it to `search` for the homepage in your `hugo.toml`. See the docs for [detailed configuration](basics/customization#activate-search).

- {{% badge style="warning" title=" " %}}Breaking{{% /badge %}} The parameter `description` in your `hugo.toml` will now be ignored.

With the newly introduced unified handling of descriptions throughout the theme, the only place the old parameter would have been used was your home page.

For migration, move the `description` parameter of your `hugo.toml` into the frontmatter section of your home page.

- {{% badge style="warning" title=" " %}}Breaking{{% /badge %}} The frontmatter option `menuTitle` is now unsupported in favor for Hugo’s own `linkTitle`.
- {{% badge style="warning" title=" " %}}Breaking{{% /badge %}} Search support for the `json` outputformat [deprecated in 5.4.0](#540) was removed.

Change it to `search` for the homepage in your `hugo.toml`. See the docs for [detailed configuration](basics/customization#activate-search).

- {{% badge style="warning" title=" " %}}Breaking{{% /badge %}} The frontmatter option `menuTitle` [deprecated in 5.24.0](#5240) was removed in favor for Hugo’s own `linkTitle`.

Additionally, if set, `linkTitle` will now be used instead of `title` to generate the breadcrumb.

- {{% badge style="warning" title=" " %}}Breaking{{% /badge %}} The `swagger` shortcode [deprecated in 5.13.0](#5130) was removed in favor for the [`openapi` shortcode](shortcodes/openapi) with the same set of parameter.

- {{% badge style="warning" title=" " %}}Breaking{{% /badge %}} Support for Internet Explorer 11 was finally dropped.

- {{% badge style="note" title=" " %}}Change{{% /badge %}} With the removal of support for Internet Explorer 11, Font Awesome was upgraded to version 6.5.2.
Expand Down
11 changes: 1 addition & 10 deletions layouts/partials/shortcodes/swagger.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
{{- $page := .page }}
{{- warnf "%q: DEPRECATED shortcode `swagger` found, use `openapi` instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5130" $page.File.Filename }}
{{- if and (not $page) .context }}
{{- $page = .context }}
{{- warnf "%q: DEPRECATED parameter 'context' for shortcode 'swagger' found, use 'page' instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#5180" $page.File.Filename }}
{{- end }}
{{- partial "shortcodes/openapi.html" (dict
"page" $page
"src" .src
"id" .id
) }}
{{- warnf "%q: UNSUPPORTED shortcode `swagger` found, use `openapi` instead; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration#600" $page.File.Filename }}

0 comments on commit aed8845

Please sign in to comment.