### JavaScript Redirect Logic
Source: https://gitlab.com/codethinklabs/trustable/trustable/-/blob/main/public/404.html
This script determines the correct path and redirects the user. It handles cases where the current path is the strip path or starts with it.
```javascript
const base = "https://pages.eclipse.dev/eclipse/tsf/tsf"; const strip = "/trustable/trustable"; let p = location.pathname; if (p === strip) p = "/"; else if (p.startsWith(strip + "/")) p = p.slice(strip.length); window.location.replace( base + p + location.search + location.hash );
```
--------------------------------
### Root Redirect Page (HTML)
Source: https://context7.com/codethinklabs/trustable/llms.txt
Handles the root URL by immediately replacing the current location with the new documentation home page. This ensures the redirect is not stored in browser history.
```html
Redirect link
```
--------------------------------
### GitLab CI/CD Deployment Pipeline (YAML)
Source: https://context7.com/codethinklabs/trustable/llms.txt
Deploys the public/ directory as a GitLab Pages site on every push to the main branch. This makes the redirect pages publicly accessible.
```yaml
pages:
stage: deploy
image: alpine:latest
script:
- echo "Deploy GitLab Pages from public dir"
artifacts:
paths:
- public
only:
- main
```
--------------------------------
### Path-Preserving 404 Redirect Page (HTML)
Source: https://context7.com/codethinklabs/trustable/llms.txt
Strips the old GitLab Pages path prefix and appends the remainder, including query string and hash fragment, to the new base URL. This preserves deep links to specific documentation pages.
```html
Redirect link to homepage
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.