Skip to content

Commit

Permalink
Use a redirect so we can switch to different reference docs later
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 16, 2023
1 parent 386173d commit ec28f76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ app.any('/docs/*file').to('docs#index', {file: null});

app.any('/news/*file').to('news#index');

app.get('/api', async ctx => {
await ctx.redirectTo('https://mojojs.org/static/reference/modules.html');
});

app.get('/', async ctx => {
await ctx.render({view: 'index'});
});
Expand Down
2 changes: 1 addition & 1 deletion views/menubar.html.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<a class="dropdown-item" href="<%= ctx.urlFor('/docs/FAQ.md') %>">FAQ</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="<%= ctx.urlFor('/docs/Cheatsheet.md') %>">Cheatsheet</a>
<a class="dropdown-item" href="https://mojojs.org/static/reference/modules.html" target="_blank">API</a>
<a class="dropdown-item" href="https://mojojs.org/api" target="_blank">API</a>
</div>
</li>
<li class="nav-item dropdown">
Expand Down

0 comments on commit ec28f76

Please sign in to comment.