mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
parent
1f6e0de361
commit
c38bfda43b
9 changed files with 101 additions and 31 deletions
|
@ -292,12 +292,12 @@ func AddContextRoot(baseURL, relativePath string) string {
|
|||
// URLizeAndPrep applies misc sanitation to the given URL to get it in line
|
||||
// with the Hugo standard.
|
||||
func (p *PathSpec) URLizeAndPrep(in string) string {
|
||||
return URLPrep(p.uglyURLs, p.URLize(in))
|
||||
return p.URLPrep(p.URLize(in))
|
||||
}
|
||||
|
||||
// URLPrep applies misc sanitation to the given URL.
|
||||
func URLPrep(ugly bool, in string) string {
|
||||
if ugly {
|
||||
func (p *PathSpec) URLPrep(in string) string {
|
||||
if p.uglyURLs {
|
||||
x := Uglify(SanitizeURL(in))
|
||||
return x
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue