Can you "call" another HTML file within an HTML file?

This page summarizes the projects mentioned and recommended in the original post on /r/webdev

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • htmx

    </> htmx - high power tools for HTML

  • If you end up resorting to javascript for this I recommend you use htmx

  • Twig

    Twig, the flexible, fast, and secure template language for PHP

  • I'd also recommend to OP (and you if you're interested) to check out Twig. I find it a lot easier to learn and read than straight-up PHP.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • eleventy-base-blog

    A starter repository for a blog web site using the Eleventy static site generator.

  • I would do this with Eleventy which is a powerful static site generator with support for html partials (partial is what I call your toolbar here). You would use the template language nunjucks which Eleventy comes with support for, or you can choose plain html too if you don't want the Nunjucks capabilities for logic like if/else, for loops, javascript injection of dynamic values in your html at site generation time, etc. This repo shows most of the techniques you could need and use: https://github.com/11ty/eleventy-base-blog

  • nunjucks

    A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)

  • Some years ago i hade the same problem as you. I used https://mozilla.github.io/nunjucks/ (Nunjucks) to solve my problem. Which was exactly what i needed. super easy to use. Made everything super structured and you can put everything into separate HTML files, and thereafter assemble it in one HTML file with simple commands.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts