Skip to content

Commit

Permalink
Merge pull request #365 from wilzbach/dub-pm
Browse files Browse the repository at this point in the history
Move the documentation to dub.pm
  • Loading branch information
wilzbach authored Jul 14, 2018
2 parents b282f07 + 13c8ea9 commit 52b1604
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 1,751 deletions.
22 changes: 10 additions & 12 deletions source/dubregistry/web.d
Original file line number Diff line number Diff line change
Expand Up @@ -477,21 +477,21 @@ class DubRegistryFullWebFrontend : DubRegistryWebFrontend {
render!("search_results.dt", queryString, results);
}

void getGettingStarted() { render!("getting_started.dt"); }
void getAbout() { redirect("/getting_started"); }
void getUsage() { redirect("/getting_started"); }
void getAdvancedUsage() { render!("advanced_usage.dt"); }
void getGettingStarted() { redirect("https://dub.pm/getting_started"); }
void getAbout() { getGettingStarted(); }
void getUsage() { getGettingStarted(); }
void getAdvancedUsage() { redirect("https://dub.pm/getting_started"); }

void getPublish() { render!("publish.dt"); }
void getDevelop() { render!("develop.dt"); }
void getPublish() { redirect("https://dub.pm/commandline"); }
void getDevelop() { redirect("https://dub.pm/commandline"); }

@path("/package-format")
void getPackageFormat(string lang = null)
{
switch (lang) {
default: redirect("package-format?lang=json"); break;
case "json": render!("package_format_json.dt"); break;
case "sdl": render!("package_format_sdl.dt"); break;
default: redirect("https://dub.pm/package-format-json"); break;
case "json": redirect("https://dub.pm/package-format-json"); break;
case "sdl": redirect("https://dub.pm/package-format-sdl"); break;
}
}

Expand Down Expand Up @@ -758,9 +758,7 @@ class DubRegistryFullWebFrontend : DubRegistryWebFrontend {
@path("/docs/commandline")
void getCommandLineDocs()
{
import dub.commandline;
auto commands = getCommands();
render!("docs.commandline.dt", commands);
redirect("https://dub.pm/commandline");
}

private void enforceUserPackage(User user, string package_name)
Expand Down
51 changes: 0 additions & 51 deletions views/advanced_usage.dt

This file was deleted.

47 changes: 0 additions & 47 deletions views/develop.dt

This file was deleted.

108 changes: 0 additions & 108 deletions views/docs.commandline.dt

This file was deleted.

119 changes: 0 additions & 119 deletions views/getting_started.dt

This file was deleted.

2 changes: 1 addition & 1 deletion views/layout.inc.menu.dt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- import std.range : empty;
- import std.string : split;
- import std.typecons : tuple;
- auto listitems = [tuple("Packages", [""]), tuple("Documentation", ["Getting Started;getting_started", "Advanced Usage;advanced_usage", "Command line documentation;docs/commandline", "Development;develop", "Package format (JSON);package-format?lang=json", "Package format (SDLang);package-format?lang=sdl"]), tuple("About", ["Forums;http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub", "Bug tracker (website);https://github.com/dlang/dub-registry/issues", "Bug tracker (DUB);https://github.com/dlang/dub/issues", "Github repository (website);https://github.com/dlang/dub-registry", "GitHub repository (DUB);https://github.com/dlang/dub"]), tuple("Download", ["download"])];
- auto listitems = [tuple("Packages", [""]), tuple("Documentation", ["Getting Started;https://dub.pm/getting_started", "Advanced Usage;https://dub.pm/advanced_usage", "Command line;https://dub.pm/commandline", "Development;https://dub.pm/develop", "Package format (JSON);https://dub.pm/package-format-json", "Package format (SDLang);https://dub.pm/package-format-sdl"]), tuple("About", ["Forums;http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub", "Bug tracker (website);https://github.com/dlang/dub-registry/issues", "Bug tracker (DUB);https://github.com/dlang/dub/issues", "Github repository (website);https://github.com/dlang/dub-registry", "GitHub repository (DUB);https://github.com/dlang/dub"]), tuple("Download", ["download"])];
- if( req.session )
- listitems ~= tuple("My account", ["Manage packages;my_packages", "Edit profile;profile", "Log out;logout"]);
- else
Expand Down
Loading

0 comments on commit 52b1604

Please sign in to comment.