Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Pages Test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Operate
Environments
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitLab Tests
Pages Test
Commits
7ead1a03
Verified
Commit
7ead1a03
authored
Jun 16, 2024
by
Chris Coley
Browse files
Options
Downloads
Patches
Plain Diff
Document all the valid URLs for files and directories in GitLab Pages
parent
29e4dda9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cache-test-symlink.html
+1
-0
1 addition, 0 deletions
src/cache-test-symlink.html
src/cache-test.html
+47
-7
47 additions, 7 deletions
src/cache-test.html
with
48 additions
and
7 deletions
src/cache-test-symlink.html
0 → 120000
+
1
−
0
View file @
7ead1a03
cache-test.html
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/cache-test.html
+
47
−
7
View file @
7ead1a03
...
@@ -8,6 +8,16 @@
...
@@ -8,6 +8,16 @@
<link
rel=
"shortcut icon"
href=
"gitlab-favicon.png"
>
<link
rel=
"shortcut icon"
href=
"gitlab-favicon.png"
>
<link
rel=
"preload"
href=
"style.css"
as=
"style"
>
<link
rel=
"preload"
href=
"style.css"
as=
"style"
>
<link
rel=
"stylesheet"
href=
"style.css"
>
<link
rel=
"stylesheet"
href=
"style.css"
>
<style>
img
{
float
:
left
;
margin-right
:
1em
;
}
.clearfix
{
clear
:
both
;
}
</style>
</head>
</head>
<body>
<body>
<header>
<header>
...
@@ -18,27 +28,57 @@
...
@@ -18,27 +28,57 @@
</header>
</header>
<main>
<main>
<h1>
Cache Test
</h1>
<h1>
Cache Test
</h1>
<img
src=
"gitlab-logo.png"
alt=
"GitLab logo"
width=
200
>
<p>
<p>
This page is meant for testing caching.
This page is meant for testing caching.
</p>
</p>
<p>
<p>
It was built on the
<strong>
%%BRANCH%%
</strong>
branch of the
It was built on the
<strong>
%%BRANCH%%
</strong>
branch of the
<a
href=
"%%PROJECT_URL%%"
><strong>
%%PROJECT_PATH%%
</strong></a>
project.
<a
href=
"%%PROJECT_URL%%"
><strong>
%%PROJECT_PATH%%
</strong></a>
project in
<a
href=
"%%JOB_URL%%"
>
Job %%JOB_ID%%
</a>
at %%JOB_TIMESTAMP%%.
</p>
</p>
<p>
<p>
The current site revision is
<a
href=
"%%PROJECT_URL%%/-/commit/%%COMMIT_SHA%%"
><code>
%%COMMIT_SHA%%
</code></a>
from %%COMMIT_TIMESTAMP%%.
The current site revision is
<a
href=
"%%PROJECT_URL%%/-/commit/%%COMMIT_SHA%%"
><code>
%%COMMIT_SHA%%
</code></a>
from %%COMMIT_TIMESTAMP%%.
</p>
</p>
<p>
<p>
It was built in
<a
href=
"%%JOB_URL%%"
>
Job %%JOB_ID%%
</a>
at %%JOB_TIMESTAMP%%.
Here's a static CSS file:
<a
href=
"style.css"
>
style.css
</a>
</p>
</p>
<p>
<p>
Here's a
CSS fil
e:
<a
href=
"
style.css"
>
style.css
</a>
Here's a
static imag
e:
<a
href=
"
gitlab-logo.png"
>
gitlab-logo.png
</a>
</p>
</p>
<p>
<p>
Here's a
n image:
Here's a
symlink to this same page:
<a
href=
"cache-test-symlink.html"
>
cache-test-symlink.html
</a>
</p>
</p>
<img
src=
"gitlab-logo.png"
alt=
"GitLab logo"
width=
200
>
<h2
class=
"clearfix"
>
Path Fudging
</h2>
<p>
The server for GitLab Pages does some path fudging to make user experience
better, but you have to make sure you account for that fudging when you
purge the cache by URLs. The fudging rules are:
</p>
<ul>
<li>
Directories can be accessed with or without a trailing slash.
</li>
<li>
Files can be accessed with or without a trailing slash.
</li>
<li>
Files with the
<code>
.html
</code>
extension can be accessed with or
without the file extension.
</li>
</ul>
<p>
So every HTML file has four URLs it can be accessed on, and every other
file and directory has two. Here are some examples:
</p>
<ul>
<li><a
href=
"cache-test.html"
>
cache-test.html
</a>
<li><a
href=
"cache-test"
>
cache-test
</a>
<li><a
href=
"cache-test.html/"
>
cache-test.html/
</a>
<li><a
href=
"cache-test/"
>
cache-test/
</a>
<li><a
href=
"style.css"
>
style.css
</a>
<li><a
href=
"style.css/"
>
style.css/
</a>
<li><a
href=
"sub"
>
sub
</a>
<li><a
href=
"sub/"
>
sub/
</a>
</ul>
</main>
</main>
</body>
</body>
</html>
</html>
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment