hapipal / hapipal.com

This is the home of hapipal.com
https://hapipal.com
MIT License
12 stars 3 forks source link

Get started fixes #52

Closed zemccartney closed 3 years ago

zemccartney commented 3 years ago

Addresses https://github.com/hapipal/hapipal.com/issues/50

Relative to the list on that issue:

  1. βœ…
  2. βœ…
  3. Updated at one point in the tutorial, appears most links were in place
  4. βœ…
  5. βœ…

Additionally,

Lastly, to the issue's suggestion of opening links in new tabs, this was a bit tricky: setting target=_blank within the markdown file didn't work; the attribute was stripped by Github's markdown API, which we use to process the file to HTML.

To workaround this, I experimented with 2 strategies, neither of which struck me as great, but both work:

@devinivy some questions for ya:

devinivy commented 3 years ago

Ay! Thanks for this, looks great and it will feel so good to resolve these.

re: opening links in new tabs, are you cool with either strategy above? Or should I cut that work completely, cool to leave links as-is?

I think we'll be stuck with a hack no matter what, since as you mentioned there's no support for this in GitHub markdown. My preference would actually be some post-processing on the frontend since I think it will be the most straightforward to understand and maintain. Something to this effect:

const markdownLinksExternal = () => {

    const links = document.querySelectorAll('.markdown-body a');

    for (let i = 0; i < links.length; ++i) {
        const link = links[i];
        link.setAttribute('target', '_blank');
    }
};

Should I update all hapi documentation link in the tutorial (and elsewhere on the site) to hapi.dev, not API.md on github? Not crucial I know, but thinking to be consistent with how each repo directs users to hapi.dev

If you are open to taking the time to do that, that would be awesome!

I was thinking adding a seed, to create list of riddles, instead of depending on people to manually recreate their own could smooth out testing the later steps in the tutorial; how does that sound to you? I realized on reading back through that having to manually recreate riddles on server startup could annoy, if not trip people up. Another non-critical, thinking just as a nice-to-have

I'm down with that, but if it would be simpler for the purposes of the tutorial to use file-backed SQLite persistence then that's cool too.

We can also pull any of these out into separate issues and address later if you'd like πŸ‘

zemccartney commented 3 years ago

Alright, I think I addressed everything (thanks for all those detailed notes, btw! πŸ™ )

Though let me know if there's anything else that'd be good to address while I'm in here!