/
githubmirror
/
tabler
Обзор
Документация
Войти
/
githubmirror
/
tabler
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
shared/layouts/RedirectLayout.astro
33 строки
949 B
Paweł Kuna
Clear remaining astro check hints in shared, docs, and screenshots (#2837)
08 авг 2026, 18:17
Не верифицирован
08 авг 2026, 18:17
2777fff
Код
Авторство
О чём код?
--- // Bare meta-refresh redirect document. interface Props { /** Redirect target. Absolute http(s) URLs are used as-is; relative ones are prefixed with `base`. */ url?: string /** Relative path to the site root from this page. Defaults to ".". */ base?: string } const { url = '', base = '.' } = Astro.props const isAbsolute = url.includes('http://') || url.includes('https://') const target = isAbsolute ? url : `${base}${url}` --- <!doctype html> <html lang="en-US"> <!-- BEGIN META --> <meta charset="utf-8" /> <title>Redirecting…</title> <link rel="canonical" href={target} /> <meta http-equiv="refresh" content={`0; url=${target}`} /> <meta name="robots" content="noindex" /> <!-- END META --> <noscript><a href={target}>Click here if you are not redirected.</a></noscript> <!-- BEGIN REDIRECT --> <script is:inline define:vars={{ target }}> location = target </script> <!-- END REDIRECT --> </html>