diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 0a3c0c064c..94d351f0cb 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1585,6 +1585,7 @@ wiki.page_already_exists = A wiki page with the same name already exists. wiki.reserved_page = The wiki page name '%s' is reserved. wiki.pages = Pages wiki.last_updated = Last updated %s +wiki.page_name_desc = Enter a name for this Wiki page. Some special names are: 'Home', '_Sidebar' and '_Footer'. activity = Activity activity.period.filter_label = Period: diff --git a/routers/web/repo/wiki.go b/routers/web/repo/wiki.go index 82f56a8c4a..44914a3e3d 100644 --- a/routers/web/repo/wiki.go +++ b/routers/web/repo/wiki.go @@ -627,6 +627,9 @@ func NewWiki(ctx *context.Context) { if !ctx.Repo.Repository.HasWiki() { ctx.Data["title"] = "Home" } + if ctx.FormString("title") != "" { + ctx.Data["title"] = ctx.FormString("title") + } ctx.HTML(http.StatusOK, tplWikiNew) } diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl index 6cfa798374..5b8cdc8164 100644 --- a/templates/repo/wiki/new.tmpl +++ b/templates/repo/wiki/new.tmpl @@ -16,6 +16,9 @@