You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main scripts should know if they're running in a cgi-bin ..
They should check for $REMOTE_HOST (or something.. look it up).
This could be useful for creating a web based admin interface for managing the site (we could use some other stuff I already made to get that going fairly quickly)..
Also, make Bash on Steroids and SQLite available if running in a cgi-bin..
When building a page, could do something like:
# create a post with Bash on Steroids CGI stuff
new post --with-cgi-backend
# create a post with sqlite3
new post --with-sqlite-backend
# create a post with both Bash on Steroids CGI stuff _and_ sqlite3
new post --with-backend
The text was updated successfully, but these errors were encountered:
Make various Mdsh functions available as an API, so we can POST stuff to the functions, and get back the output from the API response..
This could be useful for posting Markdown to mdsh, and getting back the converted output.. Which would pave the way for a nice Admin Panel running in a cgi-bin, via which users could create their pages.
Another use case would be to post JS, CSS (etc) to some endpoint, and get back the minified versions.
How to
Create the dir mdsh/api/, and put Bash-CGI scripts in there as endpoints, which are just wrappers around existing functions like process_markdown, mdsh2md, mo, generate_page_data, etc.
Example: mdsh/api/get-markdown
Post some Markdown to this endpoint, and it will run it through process_markdown and mdsh2md, then return the output.
Usage
Create a basic admin panel, that has:
a menu on the left to choose a page or post, or make a new one
some input fields to allow add/edit the front matter
a big textarea to input the markdown
a preview panel/iframe in which the rendered page appears
On updating the text, we can use onChange or onKeyUp on the textarea, to periodically post the textarea contents using AJAX to these endpoints, get the response and add them to the page in a "preview" panel.
The main scripts should know if they're running in a cgi-bin ..
They should check for $REMOTE_HOST (or something.. look it up).
This could be useful for creating a web based admin interface for managing the site (we could use some other stuff I already made to get that going fairly quickly)..
Also, make Bash on Steroids and SQLite available if running in a cgi-bin..
When building a page, could do something like:
The text was updated successfully, but these errors were encountered: