pxt icon indicating copy to clipboard operation
pxt copied to clipboard

Route *.md paths to page renderer

Open ganicke opened this issue 4 years ago • 0 comments

Description

Requesting a page for an absolute *.md path will serve the actual text/markdown instead responding with 404 or the rendered page. Showing the markdown text for the resource seems confusing for the user.

As an example, submitting http://arcade.makecode.com/about.md will serve the raw markdown for the resource instead of something more friendly:

Request URL: https://pxt.azureedge.net/blob/d4012fb88abbbca0ce64a731d5afa9b4af5f706f//about.md

# About MakeCode Arcade

MakeCode Arcade is a code editor to build Retro Arcade games for the browser
and handheld consoles.

* [Try it now!](https://arcade.makecode.com)


* [Projects](/projects)
* [Documentation](/docs)
* [Hardware](/hardware)
* [Publishing games](/publishing-games)

Current behavior

md-routing

Suggested change options

  1. Respond with the 404 page instead.
  2. In the case of a resource ending with .md, route it to the path minus the extension and just render the referred doc page.

Version info

Chrome: Version 95.0.4638.69 (Official Build) (64-bit)
arcade version:  1.6.24
Microsoft MakeCode version:  7.2.25

ganicke avatar Nov 09 '21 00:11 ganicke