0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00
svelte/site/test/utils
Luca Bonavita c8b2941d81 Support slug translations in the API docs
- implement a unicode-preserver processor and a latinizer processor via limax.

  The latinizer will maintain the case and the dollar sign so that we get anchors like:
  - #$set
  - #afterUpdate
  - #createEventDispatcher

- config.js:

  - use SLUG_PRESERVE_UNICODE to true to build the site so that anchors in /docs preserve unicode chars (for languages like cyrillic)
    (see test/utils/slug.js)

  - use SLUG_SEPARATOR to easily update slugs in /docs

  - use SLUG_LANG to set up the language to translate unicode symbols in anchors:
    - de: 'Ich ♥ Deutsch' -> 'ich-liebe-deutsch'
    - en: 'Ich ♥ Deutsch' -> 'ich-love-deutsch'

Fixes #2344
2019-04-17 00:42:53 +01:00
..
slug.js Support slug translations in the API docs 2019-04-17 00:42:53 +01:00