Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
483e49e3
Commit
483e49e3
authored
7 years ago
by
m5o
Committed by
XhmikosR
7 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Enable docsearch in development env.
Previously a search redirected to `
https://getbootstrap.com/...`
parent
d01b4eb0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
_includes/docs-sidebar.html
+1
-1
_includes/docs-sidebar.html
assets/js/src/application.js
+2
-1
assets/js/src/application.js
with
3 additions
and
2 deletions
+3
-2
_includes/docs-sidebar.html
+
1
-
1
View file @
483e49e3
<form
class=
"bd-search d-flex align-items-center"
>
<form
class=
"bd-search d-flex align-items-center"
>
<input
type=
"search"
class=
"form-control"
id=
"search-input"
placeholder=
"Search..."
aria-label=
"Search for..."
autocomplete=
"off"
>
<input
type=
"search"
class=
"form-control"
id=
"search-input"
placeholder=
"Search..."
aria-label=
"Search for..."
autocomplete=
"off"
data-baseurl=
"{{ site.baseurl }}/docs/{{ site.docs_version }}"
>
<button
class=
"btn btn-link bd-search-docs-toggle d-md-none p-0 ml-3"
type=
"button"
data-toggle=
"collapse"
data-target=
"#bd-docs-nav"
aria-controls=
"bd-docs-nav"
aria-expanded=
"false"
aria-label=
"Toggle docs navigation"
>
<button
class=
"btn btn-link bd-search-docs-toggle d-md-none p-0 ml-3"
type=
"button"
data-toggle=
"collapse"
data-target=
"#bd-docs-nav"
aria-controls=
"bd-docs-nav"
aria-expanded=
"false"
aria-label=
"Toggle docs navigation"
>
{%- include icons/menu.svg width="30" height="30" -%}
{%- include icons/menu.svg width="30" height="30" -%}
</button>
</button>
...
...
This diff is collapsed.
Click to expand it.
assets/js/src/application.js
+
2
-
1
View file @
483e49e3
...
@@ -115,7 +115,8 @@
...
@@ -115,7 +115,8 @@
},
},
transformData
:
function
(
hits
)
{
transformData
:
function
(
hits
)
{
return
hits
.
map
(
function
(
hit
)
{
return
hits
.
map
(
function
(
hit
)
{
hit
.
url
=
hit
.
url
.
replace
(
'
https://v4-alpha.getbootstrap.com
'
,
'
/docs/4.0
'
)
var
baseurl
=
document
.
getElementById
(
'
search-input
'
).
getAttribute
(
'
data-baseurl
'
)
hit
.
url
=
hit
.
url
.
replace
(
'
https://getbootstrap.com
'
+
baseurl
,
baseurl
)
return
hit
return
hit
})
})
},
},
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment