Skip to content

v1.3.0

Compare
Choose a tag to compare
@SebastianKohler SebastianKohler released this 16 Feb 08:33
· 72 commits to main since this release
f6b6ee6

1.3.0 – 2024-02-16

Added

  • Config options to enable server-side rendering of the collection side menu and prebuild static versions of the menu: config.app.ssr.collectionSideMenu and config.app.prebuild.staticCollectionMenus. Both options are booleans. config.app.ssr.collectionSideMenu defaults to false, which means that rendering of the dynamic collection side menu is not performed on the server, but deferred to the browser. This increases performance on the server for projects that have very large collections (hundreds of texts/collection). config.app.prebuild.staticCollectionMenus defaults to true, which means that static HTML versions of each collection menu, in each project language, are generated when the Docker image of the app is built. The static collection menus are included in the server-side rendering of collection pages, and then replaced with the dynamic collection menus in the browser. This improves SEO of collection pages when server-side rendering of collection menus is disabled, without degrading the user experience. Setting both new options to false puts the least load on the server, but makes the web app less crawlable by robots. Notice that the static menus are generated during build-time – if the collection table of contents are updated in the backend, a new build has to be created for the changes to be reflected in the static menus. (a25be18, 78108e3, 2ec89c3, 5848028)
  • Config option to control the generation of a sitemap file in a prebuild step: config.app.prebuild.sitemap. Defaults to true. (02d8b65)
  • Config option to define the intrinsic dimensions of the default banner image on the home page: config.page.home.bannerImage.intrinsicSize. The option defaults to null, meaning that the height and width attributes are not set on the image. The option takes an object with height and width keys and their respective values as numbers (the implicit unit is pixels). Setting the intrinsic dimensions of the image file (defined by the config.page.home.bannerImage.URL option) is recommended since the browser can then calculate the aspect ratio of the image, which improves initial page rendering. (4495d91)
  • Config option to define alternate image sources for the banner image on the home page: config.page.home.bannerImage.alternateSources. The option defaults to an empty array, which means that the banner image is rendered like before using the image URL provided in config.page.home.bannerImage.URL. The new alternateSources option takes an array of objects. If the array is non-empty, the banner image will be created as a <picture> element with each of the objects in the array specifying a <source> HTML element. The object can contain key-value pairs where the keys are the allowed attributes of the <source> element (media, srcset, sizes, type, height, width) and the values are strings or numbers defining the values of the corresponding attributes. For examples, see the forthcoming documentation. Using the alternateSources option makes it possible to define responsive images for the banner image (serve different image files based on screen resolution) and serve modern image formats like AVIF for reduced bandwidth. The default image defined by the URL option is still needed – it is used as the fallback image defined by the <img> element in the <picture> element. (49708b7)
  • The current text title in the text-changer component is appended with the value of the text_two property of the TOC item if the property exists. The previous/next text buttons have been changed into links and are thus crawlable. (5848028)
  • Vary: User-Agent HTTP response header to server-side rendered content. This enables more efficient caching and improves SEO by telling browsers etc. that the content varies by user agent (mobile vs desktop). (1160490)

Changed

  • Defer loading of the facsimile component on the collection text page to the browser. This increases server-side rendering performance since the component isn’t rendered on the server. (69fa89a, 5bbdaae)
  • Defer loading of the illustrations component on the collection text page to the browser. This increases server-side rendering performance since the component isn’t rendered on the server. (eb60a82)
  • Defer loading of the epub viewer component to the browser, since it’s not SSR-compatible. The epub title is shown as a <h1> placeholder in the server response. Also show pdf title as <h1> in the pdf viewer component. (7658b71)
  • Refactor requests for flattened collection table of contents to use function in the collection TOC service. (a6b643b)
  • Refactor the download texts modal to get the current text title from the document head service. (baa0a44)
  • Update the development notes with brief descriptions of dependencies. (34a1a7c)
  • Deps: update @angular to 17.2.1. (e78ed03, 0dffb42, 073f167)
  • Deps: update @ionic to 7.7.2. (5b57491, 7bd4e41, ad8b502)
  • Deps: update marked to 12.0.0. (17dc71e, dd6548b)
  • Deps: update zone.js to 0.14.4. (47d90dd)
  • Deps: update jasmine-core to 5.1.2. (3e2402b)
  • Deps: update ng-extract-i18n-merge to 2.10.0. (0387016)
  • Deps: update @types/node to 20.11.19. (75f2527, 90bc7f3, 67e4e80)

Fixed

  • Set correct app mode (desktop or mobile) on the server. Prior to this fix the server app would always return the app rendered in desktop mode, regardless of the actual client device. Previously Ionic’s Platform service was used to determine the current device in the browser, but since it’s not SSR-compatible, the user agent string is now used instead. On the server, the user agent is read from the request headers, and in the browser from the Window.navigator object. The app mode is now correctly set for most devices and browsers. One notable exception is Safari on iPads with iOS 13+, which are recognized as desktop devices. Using only the user agent string, it is not possible to distinguish Safari on iPads with iOS 13+ from Safari on MacBooks with MacOS. This fix makes the app compatible with Angular hydration, and nullifies the unreleased changes in a2f3ea2. (7a9efed)

Removed