curiousdannii / parchment

The Interactive Fiction web app
https://iplayif.com
MIT License
424 stars 60 forks source link

Provide instructions on generating HTML with Parchment #31

Closed dfabulich closed 7 years ago

dfabulich commented 7 years ago

Maybe I could fix a bug or two in Parchment, but I have no idea how to generate an HTML page with it, so I can't test my changes in a browser.

It would be great if somebody were to update the README explaining how I could generate a playable HTML site, given a fresh git clone and a blorb/gblorb/z5/zblorb game file.

curiousdannii commented 7 years ago

So if you can run grunt then that's all you need, index.html and parchment.full.html should just work.

One catch is if you run it from file: on Chrome, then Chrome won't want to load a local story file. It will be able to load one off of http(s), and if it were converted to a .js file then it will load it, but not a plain gblorb etc.

dfabulich commented 7 years ago

In Firefox, I open index.html or parchment.full.html and it just says:

Parchment

is an interpreter for Interactive Fiction. Find out more.

Find stories to play at the Interactive Fiction Database

Now what?

curiousdannii commented 7 years ago

Ah, sorry. Just add ?story=http://mirror.ifarchive.org/if-archive/games/glulx/advent.ulx to the url.

(I would love to have more of a library type interface, select your file etc, but time does not permit for now.)

Also some of this is documented at https://github.com/curiousdannii/parchment/wiki/Options

nickbe commented 7 years ago

Could you please provide a simple example for us: I tried this one here:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>myStory</title>
    <script src="lib/jquery.min.js"></script>
    <script src="lib/parchment.min.js"></script>
    <link rel="stylesheet" href="lib/parchment.min.css">
    <meta name="viewport" content="width=device-width,user-scalable=no">
</head>
<script>
parchment_options = {
    default_story: [ 'stories/curses.z5', 'stories/curses.z5.js' ],
    lib_path: 'lib/'
};
</script>
<body>
    <div id="parchment" aria-live="polite" aria-atomic="false" aria-relevant="additions" style="width: 100%"></div>
</body>
</html>

but all I get when entereing commands is: That's not a verb I recognise Also, which is the minimal set of files that we need to run parchment? Do we need the src folder?

curiousdannii commented 7 years ago

@nickbe I'll answer you at #34