Questions tagged [static-site]

Static sites are websites that have no dynamic components, e.g. databases or server-side scripting languages. A number of static site generators exist in a variety of languages, such as Jekyll, Wintersmith, and Pelican.

523 questions
105
votes
16 answers

How to add a favicon to a Next.js static site?

I'm trying to add a favicon to a Next.js static site without much luck. I've tried customising the document with components from 'next/document' https://nextjs.org/docs/#custom-document A straight link to the favicon.ico file doesn't work because…
Advait Junnarkar
  • 3,283
  • 4
  • 13
  • 25
41
votes
7 answers

Recommendations of static site generator which accepts Markdown documents?

I'm looking for static site generator which accepts Markdown documents as input source code. I used Markdoc, but it looks abandoned. And it doesn't copy static file in source document folder. So I'm installing docpad now. Anyway I want to try other…
eonil
  • 83,476
  • 81
  • 317
  • 516
40
votes
6 answers

Error: getStaticPaths is required for dynamic SSG pages and is missing for "xxx". NextJS

I am getting this error "Error: getStaticPaths is required for dynamic SSG pages and is missing for 'xxx'" when I try to create my page in NextJS. I don't want to generate any static page on build time. So why do I need to create a 'getStaticPaths'…
Juanma Menendez
  • 17,253
  • 7
  • 59
  • 56
40
votes
2 answers

How to solve "x-cache: Error from cloudfront" on SPA

We are having issues trying to make working a SPA with a client router (react router). We are using the concept of have a DOMAIN -> CDN (CloudFront) -> S3 for serving our static files. We have configured the S3 for serving static files. The CDN are…
chemitaxis
  • 13,889
  • 17
  • 74
  • 125
34
votes
1 answer

`aws s3 cp` vs `aws s3 sync` behavior and cost

I have a static site that I am deploying to s3 and then using CloudFront to distribute to users. After I build the site, I want to push the new build to s3. I found 2 approaches to do that. aws s3 cp --recursive ./public/ s3://bucket-name…
Rohan Singh
  • 463
  • 2
  • 5
  • 8
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
32
votes
2 answers

Hugo shortcode ignored saying "raw HTML omitted"

I have written a shortcode to create a bootstrap dismissable alert box. Below is my shortcode called as layouts/shortcodes/message.html.
28
votes
7 answers

Start an apache server in any directory from command line

I want to be able to start an apache server from the command line, typing something like apache site-folder or apache . --port=2000 This should read and use .htaccess files. I know about python -m SimpleHTTPServer and it's close to what I need, but…
26
votes
4 answers

Jekyll on GitHub Pages: include markdown in another markdown file

I'm using kramdown with Jekyll on GitHub Pages. I have a piece of markdown that I want to use twice, and don't want to maintain two versions of it. How can I include this in other markdown files? For example, I want to type something like {: include…
Andrew Mao
  • 35,740
  • 23
  • 143
  • 224
21
votes
3 answers

Hosting SPA with Static Website option on Azure Blob Storage (clean URLs and Deep links)

I have succesfully set up a static website on Azure Blob storage using the $web container as advised within the Microsoft documentation. In addition, I have defined index.html for both the 'Index Document Name' and the 'Error Document Name'. This is…
20
votes
1 answer

How to make all posts have a permalink with custom format "domain.com/blog/title"?

What I'm trying to do is get all my posts to have the following format: domain.com/blog/title. However, in my _posts folder I have a file named 2010-07-11-hello.markdown and it contains the following: --- title: Hello permalink: /blog/:title/…
Noah Clark
  • 8,101
  • 14
  • 74
  • 116
20
votes
5 answers

In Pelican, how to create a page dedicated to hosting all the blog articles?

In pelican, by default, blog articles are listed on the index.html file. What I want instead is that I use a static page as my home page and put all the blog articles on a dedicated "Blog" page. How can I get this done?
L.J
  • 1,066
  • 2
  • 13
  • 28
19
votes
4 answers

How do I serve index.html in subfolders with S3/Cloudfront?

Got a bucket called www.foo.site. In that site there's a landing page, an about page and some pages in a few bar/* folders. Each bar/* has an index.html page: bar/a/index.html, bar/b/index.html etc. The landing page is running fine (meaning…
jcollum
  • 43,623
  • 55
  • 191
  • 321
16
votes
5 answers

Hugo not rendering the public folder locally

When I use the command hugo, it generates the index.html in the Public folder. When I open index.html, the site load like this: But when I use the hugo serve command locally, it generates the link http://localhost:1313/, and the site load properly.…
Rajiv Singh
  • 2,947
  • 2
  • 11
  • 30
16
votes
3 answers

Is there some gulp plugin that lets it perform the function of a static site generator?

I've used a bunch of static site generators, but gulp is a better approach because it is so modular. I'm wondering if there is a plugin that performs some of the functionality of a static site generator. To my mind, all that is missing is something…
Jehan
  • 2,701
  • 2
  • 23
  • 28
1
2 3
34 35