From 4b89c66a8e9b716b152e3098808a6c18580c7cb2 Mon Sep 17 00:00:00 2001 From: tc-imba Date: Tue, 2 Apr 2024 02:06:51 +0800 Subject: [PATCH] feat: add no cache header to html --- example/content/posts/2020-10-02-Hello-World/index.mdx | 4 ++++ gatsby-theme-academic/package.json | 2 +- gatsby-theme-academic/src/components/Seo/index.jsx | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/example/content/posts/2020-10-02-Hello-World/index.mdx b/example/content/posts/2020-10-02-Hello-World/index.mdx index a1b58b4c..ef4e0586 100644 --- a/example/content/posts/2020-10-02-Hello-World/index.mdx +++ b/example/content/posts/2020-10-02-Hello-World/index.mdx @@ -114,3 +114,7 @@ for $f\in L^1$, which is the statement of [Lebesgue Differentiation Theorem](htt [//]: # () + + + + diff --git a/gatsby-theme-academic/package.json b/gatsby-theme-academic/package.json index f0fca7fb..e8d5988d 100644 --- a/gatsby-theme-academic/package.json +++ b/gatsby-theme-academic/package.json @@ -1,6 +1,6 @@ { "name": "gatsby-theme-academic", - "version": "2.1.1", + "version": "2.1.2", "main": "index.js", "author": "tc-imba", "license": "MIT", diff --git a/gatsby-theme-academic/src/components/Seo/index.jsx b/gatsby-theme-academic/src/components/Seo/index.jsx index 95a5aec9..cb776710 100644 --- a/gatsby-theme-academic/src/components/Seo/index.jsx +++ b/gatsby-theme-academic/src/components/Seo/index.jsx @@ -75,6 +75,10 @@ function SEO({ { name: 'twitter:image:alt', content: description }, { name: 'twitter:site', content: siteMetadata.author }, { name: 'twitter:creator', content: siteMetadata.author }, + /* HTTP no cache */ + { 'http-equiv': 'Cache-Control', content: 'no-cache, no-store, must-revalidate' }, + { 'http-equiv': 'Pragma', content: 'no-cache' }, + { 'http-equiv': 'Expires', content: '0' }, ] .concat(metaKeywords) // Keywords .concat(meta || []) // Other provided metadata