Post is in the link - simplest method possible please: my web dev skills are weak!

  • irelephant [he/him]@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    13 hours ago

    Its probably better to use some form of server-side rendering.

    You can put it in an iframe, but that’s bad for accessibility. You can put it in a regular frame, but that element is deprecated.

    You could also make a small script that adds the contents of the file into a div

  • shnizmuffin@lemmy.inbutts.lol
    link
    fedilink
    English
    arrow-up
    2
    ·
    21 hours ago

    This is not possible* with native HTML.

    You’ll want to either preprocess your website with a templating language (Nunjucks or Handlebars are probably the easiest), or enable server-side technology (PHP includes are probably the simple solution) to build your page navigation on request.

    *There are some bad hacks on StackOverflow.