BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
e5c97101
Commit
e5c97101
authored
May 03, 2016
by
Artem Sidorenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the relative url prefix for links in Wiki
parent
5e130c3e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
3 deletions
+7
-3
CHANGELOG
CHANGELOG
+3
-0
project_wiki.rb
app/models/project_wiki.rb
+1
-1
url_builder.rb
lib/gitlab/url_builder.rb
+1
-1
project_wiki_spec.rb
spec/models/project_wiki_spec.rb
+2
-1
No files found.
CHANGELOG
View file @
e5c97101
...
...
@@ -52,6 +52,9 @@ v 8.8.0 (unreleased)
- Hide left sidebar on phone screens to give more space for content
- Redesign navigation for profile and group pages
v 8.7.6
- Fix links on wiki pages for relative url setups. !4131 (Artem Sidorenko)
v 8.7.5
- Fix relative links in wiki pages. !4050
- Fix always showing build notification message when switching between merge requests !4086
...
...
app/models/project_wiki.rb
View file @
e5c97101
...
...
@@ -40,7 +40,7 @@ class ProjectWiki
end
def
wiki_base_path
[
"/"
,
@project
.
path_with_namespace
,
"/wikis"
].
join
(
''
)
[
Gitlab
.
config
.
gitlab
.
relative_url_root
,
"/"
,
@project
.
path_with_namespace
,
"/wikis"
].
join
(
''
)
end
# Returns the Gollum::Wiki object.
...
...
lib/gitlab/url_builder.rb
View file @
e5c97101
...
...
@@ -62,7 +62,7 @@ module Gitlab
end
def
wiki_page_url
"
#{
Gitlab
.
config
.
gitlab
.
url
}#{
object
.
wiki
.
wiki_base_path
}
/
#{
object
.
slug
}
"
namespace_project_wiki_url
(
object
.
wiki
.
project
.
namespace
,
object
.
wiki
.
project
,
object
.
slug
)
end
end
end
spec/models/project_wiki_spec.rb
View file @
e5c97101
...
...
@@ -38,7 +38,8 @@ describe ProjectWiki, models: true do
describe
"#wiki_base_path"
do
it
"returns the wiki base path"
do
wiki_base_path
=
"/
#{
project
.
path_with_namespace
}
/wikis"
wiki_base_path
=
"
#{
Gitlab
.
config
.
gitlab
.
relative_url_root
}
/
#{
project
.
path_with_namespace
}
/wikis"
expect
(
subject
.
wiki_base_path
).
to
eq
(
wiki_base_path
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment