Best practice to permalinks to migrate old website

Hi - we want to support existing permalinks like
but the default markdown translator appears to place this in /_pages/doc/info/attrs.html
in the gitlab site, which is going to break a lot of external references. This must be a well-
understood problem.

I spent a couple of hours tonight trying things.

  • It’s easy to place the contents of attrs.html inside a very minimal .md wrapper, but
    this resulted in the “undefined method force_encoding” heisenbug. The bug appeared
    to go away if I removed some of the PRE content in the HTML, but this
    doesn’t inspire confidence and may not work in general.

There are jekyll plugins that seem to help: jekyll-alias-generator seems useful but
is not supported in gitlab and I was relucant to start using custom plugins because
I’m not even sure how they work here, plus additional complexity seems bad.

There’s also redirect-from which appears to be available here, but my content resulted in:
Liquid Exception: invalid byte sequence in US-ASCII in _layouts/redirect.html
I tried fixing this in _config.yml with a lot of

  - apt-get update >/dev/null
  - apt-get install -y locales >/dev/null
  - echo "en_US UTF-8" > /etc/locale.gen
  - locale-gen en_US.UTF-8
  - export LANG=en_US.UTF-8
  - export LANGUAGE=en_US:en
  - export LC_ALL=en_US.UTF-8

or just

  - export LANG=en_US.UTF-8
  - export LANGUAGE=en_US:en
  - export LC_ALL=en_US.UTF-8

etc. but none of this made any difference so I backed out all my experiments that broke the build.

How do other people deal with this without a lot of complication?

Stephen North a.k.a. north from