Questions tagged [static-html]

74 questions
33
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 a HTML file with that just says: Hello World. I know I can do that with Django too, but later on I want to display my website…
jjuser19jj
  • 1,303
  • 2
  • 15
  • 34
32
votes
2 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
  • 431
  • 1
  • 6
  • 10
19
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,355
  • 2
  • 13
  • 22
11
votes
1 answer

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
  • 203
  • 2
  • 10
8
votes
1 answer

Branch specific environment variables on Netlify

We're using Netlify's automatic deployment for all pushed git branches. We want to include our analytics scripts (et al) only for the master branch, i.e. the version of the website that our users are visiting. It's possible to build environment…
Fellow Stranger
  • 25,431
  • 22
  • 134
  • 188
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
  • 3,457
  • 3
  • 23
  • 42
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,515
  • 5
  • 23
  • 32
6
votes
3 answers

What are benefits of serving static HTML and generating content with AJAX/JSON?

http://blog.urbantastic.com/post/81336210/tech-tuesday-the-fiddly-bits 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 and then…
6
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
  • 792
  • 4
  • 13
  • 27
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
  • 1,845
  • 4
  • 19
  • 16
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
  • 369
  • 3
  • 14
5
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,423
  • 1
  • 29
  • 36
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
  • 10,661
  • 12
  • 72
  • 141
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
  • 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
  • 11,813
  • 14
  • 55
  • 105
1
2 3 4 5