Questions tagged [static-html]
77 questions
38
votes
6 answers
How to return a static HTML file as a response in Django?
I have not figured out how I can present a website with pure HTML code and/or HTML + JavaScript + CSS.
I tried to load an HTML file that just says: Hello World.
I know I can do that with Django too, but later on, I want to display my website with…

jjuser19jj
- 1,637
- 3
- 20
- 38
34
votes
3 answers
How do I generate a static html file from a django template?
I'm new to Django, and I'm pretty sure I've read or heard about a way to do this, but I can't find it anywhere.
Rather than sending the rendered output from a template to a browser, I want to create an html file that can then be served without the…

Beverly Block
- 481
- 1
- 6
- 10
21
votes
5 answers
Serve static file using App Engine
I created an App Engine application. Till now, I only have a few HTML files to serve. What can I do to make App Engine serve the index.html file whenever someone visits http://example.appengine.com/ ?
Currently, my app.yaml file looks like…

User
- 1,363
- 2
- 13
- 23
17
votes
4 answers
How to use react-router BrowserRouter in a static index.html file
I'm attempting to use the static index.html file generated by npm run build, along with react-router. the tl;dr is; i do not want a client server, I want the app to be loaded by opening the index.html file located in the build folder and still have…

Dsabadash
- 445
- 1
- 4
- 12
8
votes
1 answer
Tomcat 7.0.35 set HTTP response header Content-Type charset for static HTML files
I am serving some static HTML files and a servlet all in a single war file from a standalone Tomcat 7.0.35 server using the HTTP Connector.
I want to specify the charset of all the static HTML files by setting the HTTP response header…

XDR
- 4,070
- 3
- 30
- 54
8
votes
2 answers
How to Archive a Dynamic (PHP) Website as Static HTML?
We're in the process of shutting down The Conversations Network (including the IT Conversations podcast). The plan is to render a static-HTML version of our websites for permanent hosting at the Internet Archive.
What's the easiest way to generate…

Doug Kaye
- 1,565
- 5
- 23
- 32
7
votes
3 answers
EnableWebMvc throws ServletException: Could not resolve view with name
Playing around with Spring Boot + MVC with static HTML pages, while noticed this thing:
Firstly, what I have:
Index controller:
@Controller
public class IndexController {
@RequestMapping("/")
public String index() {
return…

Bublik
- 912
- 5
- 15
- 30
6
votes
3 answers
What are benefits of serving static HTML and generating content with AJAX/JSON?
https://urbantastic-blog.tumblr.com/post/81336210/tech-tuesday-the-fiddly-bits/amp
Heath from Urbantastic writes about his HTML generation system:
All the HTML in Urbantastic is completely static. All dynamic data is sent via AJAX in JSON format…

mannicken
- 6,885
- 4
- 31
- 38
6
votes
2 answers
Having html pages without an extension (aka 'pretty urls') render as html using netlify
I'm trying to use netlify to host a static site. I'm building the site using wget -mk http://hostname/ so I get a large number of static files, with links rewritten.
I'd like to push them to netlify and have that host the site.
Pages that end in…

mooreds
- 4,932
- 2
- 32
- 40
6
votes
5 answers
Correct way to Load JS Files With HTML files through NodeJS
I cant get the contents included in the head of the served defualt.htm page to "work". The html loads in the dom, just the CSS and JS files fail. Is there a better alternative? Id like to keep the solution within NodeJS but alternatively open to…

sia
- 2,185
- 4
- 20
- 17
5
votes
2 answers
How to make static Html page go through HttpModule in IIS7.0?
I have created a simple HttpModule which removes whitespaces from response before sending it to the client. This works fine for an aspx page on IIS7.0 but if i create a static html page and call it, the HttpModule does not kick in (the way i know is…

nesh_s
- 399
- 4
- 19
5
votes
4 answers
Include a slim file in another slim file
I'm working on a static website (so no real server support) and I would like to include a small slim snippet in another, possibly passing a variable to it.
Is this possible? In rails is quite easy, though the render method, but I have no idea how to…

Francesco Belladonna
- 11,361
- 12
- 77
- 147
4
votes
2 answers
How to serve two static sites with gin in golang?
I want to create an application that will call a boolean function and depending on the result provide 1 of 2 compiled react apps as static sites.
I'm using the LoadHTMLGlob function recommended by gin and it works fine with .tmpl files like the…

Jbar
- 43
- 1
- 4
4
votes
1 answer
Rendering static HTML with hamlet
How can I use the hamlet framework to generate static HTML pages from inside Haskell?
Note: This question intentionally doesn't show research effort. For my research effort, see the Q&A-style answer below.

Uli Köhler
- 13,012
- 16
- 70
- 120
4
votes
1 answer
How to replace JS and CSS references when deploying a static site?
I'm building a static site (i.e. HTML files served from a basic web server). During development I'd like to use local (and non-minified) copies of Javascript code and CSS files but when deployed, I'd like to refer to minified versions of the same…

elifiner
- 7,347
- 8
- 39
- 48