Skip to content

[semi] protect system pages (about, help) #101

Closed

Description

@cben

http://mathdown.net/?doc=help now shows random content someone put there.
Should recover old content, and find way to make it read-only (or ideally read-write but somehow moderated?). The obvious way is store it in a file and adding a "view file" (or better view any url) mode.

Activity

  1. changed the title [-][semi] protect the Help text[/-] [+][semi] protect system pages (about, help)[/+] on Jun 29, 2015
  2. cben commented on Jun 29, 2015

    @cben
    OwnerAuthor

    While at it, it'd be nice for Help to appear in side pane.

  3. cben commented on Jun 29, 2015

    @cben
    OwnerAuthor

    Of course, I also need to protect the front page (?doc=about) at some point.
    There everybody wants to edit ("sandbox" mode), so I was thinking of allowing local edits with a banner warning that they're not saved on this page.
    But then people won't see other's experiments, which is half the fun of a sandbox.
    Perhaps it's best to have a dedicated front page with some read-only content + an embedded part-page shared sandbox + strong call to action to create a new doc.

  4. cben commented on Jun 29, 2015

    @cben
    OwnerAuthor
    • make clearer that what people write in the sandbox is public
  5. added this to the "beta" milestone on Aug 3, 2015
  6. cben commented on Aug 7, 2015

    @cben
    OwnerAuthor

    Turns out "view any URL" is hard because of cross-origin security.
    StackEdit pulled it off by running a proxy on Heroku.

    Even rendering help.md from current directory seems problematic on file:// scheme.
    I could stuff the fixed help in JS (or data: but that really begs for a build step).
    Or I could stuff it in help.html or help/index.html!
    Code duplication with index.html will be annoying — all these options are really asking for a build step.
    Or I could live with requiring a local server...

  7. cben commented on Aug 7, 2015

    @cben
    OwnerAuthor

    Yes, digging some more into file:// XHR or iframes shows that even if it would ever work, it'll be a can of cross-browser worms.
    I could probably strip down the html boilerplate to

    <script src="view.js">
    # Regular markdown from here...
    

    It's tempting to just call such files foo.md for better viewing/editing in github (and everywhere else),
    but I suspect that would mess up Conent-Type headers (e.g. from GH Pages).

    => Going with requiring a local server (with some kind of fallback for file:// to at least explain why Help didn't work).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions