Context: My site has several pages of mostly text. I want a faster and more maintainable way to write each page (while still having links, italics, etc.). I think a markdown system might be best for this. My plan is to have each page have a corresponding text file full of markdown saved on the server which gets loaded in when the user clicks on the respective links. I want to do this by loading in data into the current page instead of linking to a different page so that the sidebar, scroll positions, and other things aren't reset.
Question: What is the best way (secure, works on every browser, is performant) to open that text data, parse it into some kind of HTML, and replace the body element with that?
Attempts: I've tried looking up working with local files on Stack Overflow and stuff but most of it seems to be getting files from the USER'S device instead of the server. And a lot of it is deprecated or uses dependencies that I don't understand. I dunno. I have been able to replace the body element's HTML with HTML inside of a string in JavaScript, so if I can just figure out how to load and parse markdown text files then my problem will be solved. I'm asking ChatGPT about this right now and it's pointing me in the direction of Node.js and other backend stuff. I have never worked with Node.js but it looks like the right place to start.
Experience: I am brand new to JavaScript and have little experience with web development, but I have done programming with other languages for many years.
I appreciate any help.