So in one of the websites I am developing (read: attempting to develop), you can create an article using JavaScript. So if a user wanted to create an article after the form, the JavaScript would generate a page using variables from the form. Then there is the problem of searching and (dynamically?) adding them to a list of articles. How would I do this?
The strategy I would go with (if you're only using client side JavaScript) is to have the "pages" be just elements on the page that are styled to take up either the full view of the window (like a normal HTML page would) or whatever view you choose. So, you would create the markdown in HTML for the new "page" then append that to a new "page-like" element that you sort in some order. And when you create the "page-like" element, give it some attribute i.e. if there was an article about modern rappers it might be data-keywords="rap,rapper,rappers,famous rappers" and then aggregate those elements into a list when searching and search through each one finding matches with the keywords listed in their attribute.
If you come up with some code, we can better help you produce a satisfying result.
@webmunchster Awesome! I'm happy to hear that! If you feel like it and have a Twitter, give me a follow on Twitter, and I can help you as best I can, and I post a lot of developer things, too. https://twitter.com/marcusaparsons
How Would I Make JS dynamically generate a link in repl,s editor?
So in one of the websites I am developing (read: attempting to develop), you can create an article using JavaScript. So if a user wanted to create an article after the form, the JavaScript would generate a page using variables from the form. Then there is the problem of searching and (dynamically?) adding them to a list of articles. How would I do this?
The strategy I would go with (if you're only using client side JavaScript) is to have the "pages" be just elements on the page that are styled to take up either the full view of the window (like a normal HTML page would) or whatever view you choose. So, you would create the markdown in HTML for the new "page" then append that to a new "page-like" element that you sort in some order. And when you create the "page-like" element, give it some attribute i.e. if there was an article about modern rappers it might be
data-keywords="rap,rapper,rappers,famous rappers"
and then aggregate those elements into a list when searching and search through each one finding matches with the keywords listed in their attribute.If you come up with some code, we can better help you produce a satisfying result.
https://repl.it/@heyitsmarcus/Search-Dynamic-JavaScript-App