Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manos documentation broken. #115

Open
MarkKharitonov opened this issue Jul 11, 2011 · 1 comment
Open

manos documentation broken. #115

MarkKharitonov opened this issue Jul 11, 2011 · 1 comment

Comments

@MarkKharitonov
Copy link

First of all, the index page is not available at http://localhost:8181/ as the output suggests, but rather at http://localhost:8181/Index

But even when the index page shows, all the links there are broken.

This makes it really hard to start using manos and that's a shame, because its manifesto is very inspirational.

@MarkKharitonov
Copy link
Author

OK, it seems that the default MatchType of RouteAttribute was changed from Simple to String. Once I added explicit MatchType.Simple to DocsModule.Manual and DocsModule.Tutorial methods the routing worked, but tutorial pages where still not found.

The reason for that failure is that DocsModule.WriteMarkdownDocsPage was passed the page parameter, which is "page-1.md", whereas the actual path should be "Tutorial/page-1.md".
So, instead of:

[Route("/Tutorial/{page}")]
public void Tutorial(IManosContext ctx, string page)
{
  WriteMarkdownDocsPage(ctx.Response, page);
}

We should have:

[Route("/Tutorial/{page}", MatchType = MatchType.Simple)]
public void Tutorial(IManosContext ctx, string page)
{
  WriteMarkdownDocsPage(ctx.Response, ctx.Request.Path.TrimStart('/'));
}

Now I can view the manual and the tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant