Is it possible to build a blog with html only? - html

I want to build a blog with only HTML, meaning that no database, no PHP, just plain HTML.
Is it possible to do that?
It may be weird, but I just want to build a very simple blog that just require 2 functions:
create new post
comment
It will be hosted in Azure Blob, so no PHP, no database.
Thanks.

Of course. People did it in 1996 all the time.
Create new post:
Open blog.html in notepad.
Code new blog post above the latest
Save blog.html, upload.
Comment:
"Woah, this blog is epic."

Well I guess its not a good idea but if you have to do this you'll have to work a few things manually.
You will
Create blog posts manually using any HTML editor and upload updated HTML pages to server manually.
For comments you can create a "send to email" form (http://www.tizag.com/htmlT/forms.php) and receive comments in email. After user posts comments you can show a message saying the comment is sent for moderation.
After you receive a comment in email you'll have to update it in HTML manually.
Javascript or Jquery can be used for some enhancements in the process. Hope this works. :)

No.
How do you save the posts? Only serverside scripting will make this possible.

Related

Submitting Hugo Form As JSON/TOML/YAML

I'm trying to create a website that has a form that allows people to enter data directly into a json/yaml/toml file (doesn't matter which, I don't have a preference).
It's easy to pull data out of the file to display, but I want people to submit their own information and have it saved to the file.
I don't have any code yet since I'm not even sure where to start on the form. I thought it would be super simple, just create a form and have it submit the data to the file, but I can't find the instructions in my Hugo book or online, here or otherwise.
I'd love some help if anyone has time to give me a hand.
Thank you!
Hugo is a static website generator. Acting on user-submitted data is a dynamic action. Hugo cannot help you with that. What Hugo does is to create .html from your input, and you serve those files with a web server. The files cannot change after they have been created, and Hugo is a processor that is run to create the files, not an active service running when you serve the files. Therefore, you cannot act on user-submitted data.
You either need implement everything client-side via JavaScript (or WASM), or you need to have an active backend to do what you want. In both cases, Hugo cannot help you.

How do i get the values from multiple forms in different pages in node js?

Im really new to node/MEAN stack and i would appreciate if somebody can help or guide me or point me to some related tutorials.
I have just purchased a wordpress template for a booking application. This came with different pages for choosing a date, selecting a room, the booking information and confirmation.
I have put the html pages inside the public directory and it was already running.
From the index, clicking booking will lead me to choose-date.html, then to booking info without touching the server side. How do I get the value from the date in the choose-date.html and booking-info.html? I planned to submit the information on the confirmation page.
In asp.net mvc, this could be done by having a controller and action for each and save a session in the server. If i use asp.net mvc, i have to modify the html to use a layout and such. This i want to avoid.
Angular is for single page only and as i understood it could not be applicable to this scenario though im planning to used it to post on the confirmation page.
Any suggestions? I very much appreciate any help and guidance.
Here my folder structure:
You have essentially three choices as I see it. 1) write a new app using the Wordpress template as inspiration. 2) write a Wordpress app using the template you provided. 3) write an Express app and use the template you bought for just the html.
If you do the third, there are a lot of options for doing a multi step process, but the basic pattern I've found useful is to just have one object in the database (eg your booking) and have each form be either a PUT request (so you send the whole object over the wire on each form submit) or a PATCH (where you only send the new info).
FWIW you could still do the ASP.NET method you described with storing things in session, I just don't think that's a great way to go regardless of framework.
edit
I guess arguably you could also use angularjs and treat each html chunk as an angular template that gets fetched as a directive demands it. But I think that'd be tricky to get right given where you're at with the project.

ColdFusion written in html page

I'm very new to ColdFusion (this is my second day dealing with it) and I am implementing a simple HTML page. I have a feedback form on this page and when the user hits submit, I want to email the contents of the form to myself. I have to do it using cfmail.
To try it out before I implemented it, I created the following cfmail.cfm file:
<cfmail from="#form.from#" to="myemailaddress" type="html">
Some text
</cfmail>
and passed the name of the file to the action attribute of my form. Every time I click submit on my form, it just opens the above file.
All the examples I find online pretty much show the same thing, but obviously I'm way off here.
Am I using cfmail in the wrong manner?
Thanks in advance for your help!
Just like Evik said in the comments, add a subject because it is a required field for the cfmail tag.
<cfmail to="#form.mailto#" from="#form.mailFrom#" subject="#form.subject#">
#form.body#
</cfmail>
Also check the mail settings in the ColdFusion administrator under Setting > Mail. There is also a mail log in the administrator you can check.
I recommend using Adobe online docs for ColdFusion. I referrer to it almost daily, they are great.
Here is a link to the cfmail for CF8 but at the bottom it links to other version.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_m-o_01.html
If it's just opening the file and not throwing a ColdFusion error (which it should do without the subject) then you most likely have a problem in your ColdFusion installation or more likely in the setup of your development web server is not handling the cfm scripts (IIS or Apache depending on the platform).

Where to store static info like about, history, terms, contact info

Where do people store static web page info that does not change often? Examples are about pages, history, terms, contact info, etc.
Do people normally just code this into the html, or should it be stored in a database?
What do you guys think?
Yes, They just normally code it in HTML Templates/pages. Database is not needed for such static pages.
yes , it's just HTML file or template file, no need to store in database,
if you want to editable that page from backend then you have to store in database.

Drupal 7 - Editing Default Emails in user.module file

I have drupal 7 installed on my live server. I want to edit the default text emails to Html emails which are present in user.module file. I tried changing the core file, deleted cache, deleted browser cache, but it does not work. I have also changed the permission to 777, but it did not work.
I know it is not a good idea to change the default core files, but is it possible to change the drupal core files ??
Thanks
Update
I have installed Html mail module, and i can change the look of the html, however i wish to change the actual text of the default emails.
Update 2
As mentioned in the answer below, i tried checking the the settings page in Drupal, however i could not get the forget password email and new comment email text. Is it possible to add this or edit this using the HTML mail module??
It is really simple.
Goto http://www.yourdomain.com/admin/config/people/accounts/settings
There is an "Emails" section in which you can edit all emails sent by the core user module.
Add HTML Mail module to be sure that Drupal will add the good headers and you are done !
It's definitely possible, at the end of the day the Drupal core files are just plain old PHP. While it's an extremely bad idea to hack core files (it sounds like you already know why) all you'd need to do is change the code to do what you want it to do.
The good news though is that someone has already written a module to do what you want: HTML Mail.
This module allows you to theme emails leaving the system as you would theme a normal Drupal site, and replaces the outgoing emails with those HTML versions per your settings.
All the emails are being sent from the system and the content is editable as we want. To stylize the emails, i am using html mail module as suggested by CLive.
The new account creation, account cancellation emails can be found in "Account settings" page when you login as a admin.
All other emails are set from "Actions" settings page.
I could use html tags in the emails content, i think it worked because i was using html mail module.
I hope this comment helps someone trying to change the core email content from drupal.