static-site

Gatsby StaticQuery and Rendered HTML

£可爱£侵袭症+ 提交于 2021-02-11 04:30:43
问题 I'm struggling to find out how <StaticContent> behaves. If I disable javascript in my app, everything inside a <StaticContent> will not be rendered. Is this the intended behavior? There is a way to workaround it? A partial code sample: const Sample = (props: any) => ( <StaticQuery query={graphql` query { site { siteMetadata { siteTitle siteTitleShort } } } `} render={(data) => ( // THIS CODE WILL NOT BE RENDERED IF JAVASCRIPT IS DISABLED // YOU'LL NOT BE ABLE TO FIND IT BY LOOKING INTO THE

Hugo Automation with Travis-ci and Github pages

时间秒杀一切 提交于 2021-02-08 04:54:21
问题 I am using github to host my blog and use the static site Generator HUGO to make it possible but its too tedious to make it offline and compile it then upload the public folder to gh-pages or make it available in docs folder. So i wanted to automate the process so whenever i create a new .md file in content it should generate the static site and copy the public folder to gh-pages or the following combination - Source files in "source" branch and content of "public" published to master [for

DNS_PROBE_FINISHED_NXDOMAIN with hosting static website with Google Cloud Platform

孤者浪人 提交于 2021-01-28 10:06:34
问题 I followed the instructions on hosting-static-website and successfully set up an website with the ip 34.120.167.35, where I am able to view my site. My DNS and domain name are both provided by BlueHost. I used the TXT verification and have my SSL certificate activated on Google's end. I also added my ip as an A record on Bluehost's DNS config. Once everything is setup, I entered my domain name lihenghenrychang.com in the browser and worked. However, a day after, the domain name would give

IIS doesn't render jxr file

本秂侑毒 提交于 2021-01-07 08:51:32
问题 My site is hosted on IIS. I am trying the new image format jxr, but when used in a page,it is not loaded There is no 404 error on browser. Older image format like jpeg loads correctly. 回答1: For those who forgot about MIME settings, like me, add this to web.config file: <staticContent> <mimeMap fileExtension=".jxr" mimeType="image/webp" /> <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00" /> </staticContent> 来源: https://stackoverflow.com/questions/55608709/iis-doesnt

IIS doesn't render jxr file

寵の児 提交于 2021-01-07 08:50:32
问题 My site is hosted on IIS. I am trying the new image format jxr, but when used in a page,it is not loaded There is no 404 error on browser. Older image format like jpeg loads correctly. 回答1: For those who forgot about MIME settings, like me, add this to web.config file: <staticContent> <mimeMap fileExtension=".jxr" mimeType="image/webp" /> <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00" /> </staticContent> 来源: https://stackoverflow.com/questions/55608709/iis-doesnt

Hugo shortcode ignored saying “raw HTML omitted”

◇◆丶佛笑我妖孽 提交于 2020-12-08 15:02:18
问题 I have written a shortcode to create a bootstrap dismissable alert box. Below is my shortcode called as layouts/shortcodes/message.html . <div class="alert alert-{{.Get 0}} alert-dismissible fade show" role="alert"> {{.Inner}} <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> This is how I am calling from my content markdown file: {{% message warning%}} This can cause build errors {{% /message %}} However, in the

Hugo shortcode ignored saying “raw HTML omitted”

醉酒当歌 提交于 2020-12-08 15:02:13
问题 I have written a shortcode to create a bootstrap dismissable alert box. Below is my shortcode called as layouts/shortcodes/message.html . <div class="alert alert-{{.Get 0}} alert-dismissible fade show" role="alert"> {{.Inner}} <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> This is how I am calling from my content markdown file: {{% message warning%}} This can cause build errors {{% /message %}} However, in the

Hugo shortcode ignored saying “raw HTML omitted”

风格不统一 提交于 2020-12-08 14:59:38
问题 I have written a shortcode to create a bootstrap dismissable alert box. Below is my shortcode called as layouts/shortcodes/message.html . <div class="alert alert-{{.Get 0}} alert-dismissible fade show" role="alert"> {{.Inner}} <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> This is how I am calling from my content markdown file: {{% message warning%}} This can cause build errors {{% /message %}} However, in the