[HN Gopher] Cloudflare Pages is now Generally Available
       ___________________________________________________________________
        
       Cloudflare Pages is now Generally Available
        
       Author : rita3ko
       Score  : 303 points
       Date   : 2021-04-12 13:01 UTC (10 hours ago)
        
 (HTM) web link (blog.cloudflare.com)
 (TXT) w3m dump (blog.cloudflare.com)
        
       | rattray wrote:
       | [unrelated/offtopic]:
       | 
       | Because cf devs may be listening listening, can you please change
       | the css on your blog to this:                   @media only
       | screen and (min-width: 960px)
       | 
       | nav { position: sticky; top: -0.5px; background: #FFF; }
       | 
       | Namely, `top: 0;` to `top: -0.5px`. On Retina screens it shows a
       | small gap above the nav.
        
       | StavrosK wrote:
       | Is there some way to instruct GitLab CI to push to CF Pages? I'd
       | like to use the latter, but my repo is on GitLab.
        
         | jyrkesh wrote:
         | Unfortunately, it doesn't look like it (yet!)[1]
         | 
         | I was really excited to be accepted into the beta, but
         | ultimately didn't want to move stuff to GitHub just for CF
         | Pages.
         | 
         | [1]: https://community.cloudflare.com/t/cloudflare-pages-with-
         | git...
        
           | StavrosK wrote:
           | I did manage to work around the limitation by creating a
           | mirror on Github, but it's definitely suboptimal.
        
         | chronogram wrote:
         | This is what bugs me about it too. It's so dependent on GitHub
         | for no technical reason.
        
           | StavrosK wrote:
           | They said GitLab integration is coming, but until then
           | there's only GH, unfortunately.
        
       | polyrand wrote:
       | I have been using Cloudflare pages for some time, only for small
       | sites[0]. Today I also moved my main blog[1] to it. Both pages
       | are small, so this is not a serious review.
       | 
       | I moved from Netlify. The main reasons are DNS and analytics. I
       | already manage all my DNS with Cloudflare, and having everything
       | in the same place is very convenient. Regarding analytics,
       | Cloudflare provides some very basic analytics, which I think are
       | convenient, in Netlify you need to include your own analytics
       | script or use the paid version. I also noticed pages loaded
       | noticeably faster in Cloudflare Pages.
       | 
       | On the other hand, Netlify is specialized in the kind of sites
       | you would host with Cloudflare Pages, so the overall product is
       | more polished towards that. Also, the site build (at least using
       | Hugo) is a lot faster in Netlify. Instant rollbacks in Netlify
       | are _wonderful_.
       | 
       | Overall, I really like both products a lot and I would not
       | recommend one over the other. It's also important to consider the
       | limits[2-5] of each one. In the free versions, Cloudflare limits
       | by number of builds, Netlify limits the total build minutes.
       | Netlify has a bandwidth limit, Cloudflare does not mention any
       | bandwidth limit.
       | 
       | [0] https://litements.exampl.io/ [1] https://ricardoanderegg.com/
       | [2] https://www.netlify.com/tos/ [3]
       | https://www.netlify.com/pricing/ [4]
       | https://developers.cloudflare.com/pages/platform/limits [5]
       | https://www.cloudflare.com/plans/
        
         | manigandham wrote:
         | I highly recommend Vercel too: https://vercel.com/
         | 
         | They have their own React frontend framework with next.js but
         | support any static site and dynamic APIs too.
        
           | miyuru wrote:
           | Vercel does not support IPv6 and HTTP/3 while cloudflare
           | pages already supports both of them.
        
             | austinkhale wrote:
             | Is it possible to proxy traffic through Cloudflare so that
             | at least the client --> proxy portion of the traffic is
             | done over HTTP/3?
        
               | andrewmunsell wrote:
               | All my Vercel (NextJS) apps are proxied through
               | Cloudflare without any issues
        
         | podiki wrote:
         | Thanks for this, very useful! I've been wondering about hosting
         | that gives basic analytics [0], which is sadly absent without
         | signing up and trying for most simple (static site) hosting
         | ones I've seen.
         | 
         | [0] https://news.ycombinator.com/item?id=26604015
        
           | ROARosen wrote:
           | Really, for CF analytics you just need to use their DNS, I
           | don't think they have separate analytics for 'Pages'. Though
           | they have an "app" you can add which technically adds a
           | script (on pages served through their CDN) for more detailed
           | analytics.
        
         | webmobdev wrote:
         | > I have been using Cloudflare pages for some time ...
         | 
         | > Today I also moved my main blog to it.
         | 
         | I wish you hadn't. :(
         | 
         | I am so tired of seeing so many _" Cloudflare is trying to
         | verify your browser"_ while it spends eons trying to
         | fingerprint my browser while also blatantly acting like a brand
         | ad for itself ... it's a really bad user experience.
         | 
         | It's a pity that the web is slowly being taken over by Google
         | AMP pages, Cloudflare pages and Captchas ... especially when
         | they "punish" you for using some anti-browser-fingerprinting
         | methods to protect your privacy.
        
           | tsegratis wrote:
           | Look on the bright side: you're probably minting them some
           | bitcoin
        
         | ROARosen wrote:
         | I have three sites on Netlify and I happen to really prefer
         | Cloudflare Pages' UX especially how easily it integrates with
         | DNS and their (basic) analytics like you mentioned. I would
         | love to use them but my site's load time on CF Pages has been
         | much too slow for me.
        
       | cheeaun wrote:
       | I've been using Cloudflare Pages for a few of my sites. Been
       | getting issues on one of them for the past few weeks and getting
       | "Failed: an internal error occurred" on the deployment step. I've
       | asked for support and also tweeted [1] but to no avail.
       | 
       | I eventually moved it back to GitHub Pages. My other sites seems
       | okay tho'.
       | 
       | [1] https://twitter.com/cheeaun/status/1378709230765580293
        
         | libeclipse wrote:
         | Netlify is quite good. Allows you to install Cloudflare's 10
         | year backend certificate on it so you can turn on Strict HTTPS
         | checking.
        
           | cheeaun wrote:
           | I'm using Netlify for one of my side projects. Liking it so
           | far but been getting annoyed by the limited
           | _headers/netlify.toml config these days (especially custom
           | redirects).
        
             | swyx wrote:
             | what limitation are you running into? did something change
             | recently?
        
               | cheeaun wrote:
               | I think it's been the same, just recently I need a way to
               | set custom headers for specific paths. Documentation [1]
               | says that I can use * or :placeholder(s?), but there's no
               | examples other than "/*" (which matches everything).
               | 
               | I thought it can do matches like "/folder/*/*.html"
               | but... actually can't. I try look around in the forums,
               | seeing others got confused as well and in the end I gave
               | up :D
               | 
               | As for redirects, I really like :splat [2], but for my
               | use case, I need something can be matched in the middle
               | of the URL string, e.g.: /blog/:splat/whatever. Maybe
               | this is like a weird use-case, or rather I'm thinking of
               | it like glob patterns or regex.
               | 
               | [1] https://docs.netlify.com/routing/headers/ [2]
               | https://docs.netlify.com/routing/redirects/redirect-
               | options/...
        
         | ashconnor wrote:
         | I got that error too but it still worked.
        
         | kmf wrote:
         | kristian from pages team here - just DM-ed you, let's get this
         | sorted!
        
       | dataminded wrote:
       | Anyone have a review yet?
        
         | nindalf wrote:
         | I've used it for a couple of sites so far. I really like it
         | because I don't have to worry about deployment, the preview
         | URLs are useful and it's free. I have a couple of quibbles but
         | I'm sure they'd be ironed out sooner rather than later.
        
         | luke2m wrote:
         | I'm planning to do one when I have time.
        
       | nindalf wrote:
       | I've been using it for some time (arewefastyet.rs and a personal
       | blog) and I've been pleased with it so far. It replaced my use of
       | a $5 droplet. Less hassle around deployment and $5 cheaper. The
       | killer feature is probably the previews - the private links allow
       | me to get feedback without pushing to the main site.
       | 
       | It's not perfect, but I'm sure they can fix the quirks soon. My
       | main one was git clone failing and not understanding why("Failed:
       | an internal error occurred"). The other is that I want a way for
       | the pages.dev site alone to be invisible from search engines but
       | couldn't figure out a way to do that with robots.txt. Lastly I
       | wanted to share this feedback during the beta program, but I
       | couldn't find a way other than creating a twitter account and
       | hitting up the PM. Fortunately, this thread saved me from having
       | to do that.
        
         | nilslice wrote:
         | awesome! arewefastyet.rs is a lovely resource, thanks for
         | building it.
         | 
         | > Lastly I wanted to share this feedback during the beta
         | program, but I couldn't find a way other than creating a
         | twitter account and hitting up the PM.
         | 
         | If you're on Discord, joining our channel is a great way to
         | share feedback: https://discord.gg/HcwPdhDf
        
       | riffic wrote:
       | This is a showstopper for me right now and is keeping me on
       | Netlify:
       | 
       | Pages cannot serve files located in a .well-known folder.
       | (https://developers.cloudflare.com/pages/platform/known-issue...)
       | 
       | Otherwise, a fantastic product and a great addition to the
       | ecosystem. The traditional hosting industry (think cpanel etc)
       | _hates_ this btw, so good job!
        
       | MayeulC wrote:
       | I like that it's easier and easier to host HTML content "for
       | free" on the web.
       | 
       | However, I'm a bit concerned when I look at the size, breadth and
       | growth of cloudfare (ie, cloudfare absorbing the web). As a way
       | to lessen these concerns, I would really, really like it if they
       | were to offer cloudfare pages as an IPFS (or gnunet, hypercore,
       | etc) gateway too.
       | 
       | Modify your pages and publish it on IPFS, have the changes
       | propagated on cloudfare: that would be nice :)
        
         | nilslice wrote:
         | This might be of interest to you:
         | https://blog.cloudflare.com/distributed-web-gateway/
        
           | MayeulC wrote:
           | > Using Cloudflare's gateway, you can also build a website
           | that's hosted entirely on IPFS, but still available to your
           | users at a custom domain name.
           | 
           | ... Don't tell me it's already doable? This is awesome!!!
           | 
           | https://developers.cloudflare.com/distributed-web/ipfs-
           | gatew...                   1. CNAME for your.website pointing
           | to cloudflare-ipfs.com         2. TXT record for
           | _dnslink.your.website with the value
           | dnslink=/ipfs/<your_hash_here>
           | 
           | And you have a website hosted on both http and ipfs? I'm
           | stoked!
           | 
           | Thanks a lot for pointing this out! I did encounter
           | cloudfare's IPFS gateway (on libgen, of all the places)
           | shortly after writing my previous comment, but I hadn't
           | imagined they offered such a pages system with it. I don't
           | know if they cache the pages, though?
        
       | hannofcart wrote:
       | Please give a useful technical description of what Cloudflare
       | Pages is within the first 2 paragraphs. Even the section titled
       | 'What is Cloudflare Pages' is entirely unhelpful marketing
       | drivel:
       | 
       | > Cloudflare Pages radically simplifies the process of developing
       | and deploying sites by taking care of all the tedious parts of
       | web development. Now, developers can focus on the fun and
       | creative parts instead.
        
         | riffic wrote:
         | managed static site building and hosting.
         | 
         | https://developers.cloudflare.com/pages/
        
           | andrei_says_ wrote:
           | It blows my mind how simple products get incomprehensible and
           | convoluted descriptions, creating unnecessary friction in
           | understanding and adopting often brilliant engineering
           | solutions.
           | 
           | Reminds me of the Hollywood blockbusters where one can see
           | the meticulous work of the world's best production, CGI,
           | make-up, animation artists, the best DPs and designers on the
           | planet, get destroyed by superficial stories lacking
           | originality and imagination.
        
       | aphextron wrote:
       | With this + workers it's pretty exciting to have a legit AWS
       | alternative for a serverless stack. Excited to try that out.
        
       | sandGorgon wrote:
       | is there any example on how to deploy Nextjs to cloudflare pages
       | ?
        
         | ashconnor wrote:
         | https://developers.cloudflare.com/pages/how-to/deploy-a-next...
        
       | yesimahuman wrote:
       | A good reminder that static web app hosting is a race to the
       | bottom and filled with options. Do not envy the companies
       | competing in this space.
       | 
       | I think Cloudflare has a ways to go before frontend devs really
       | think of them as anything more than just DNS hosting but this
       | looks very promising and a very smart move on their part. Looking
       | forward to trying it!
        
       | snake_case wrote:
       | I've migrated my blog [1] and another landing page from Netlify
       | to Cloudflare Pages so far and have been pretty happy with it!
       | 
       | @rita3ko I would love the ability to disable automatic preview
       | builds. My "production" branch which Cloudflare Pages deploys
       | from has a /public directory which I ship, but my other branches
       | are not structured the same and therefore cause build failures. I
       | just don't need preview builds for my use case.
       | 
       | [1]: https://jakedeichert.com
        
       | thitcanh wrote:
       | It's an interesting product but it's very barebones. Netlify is a
       | whole company vested in making the same thing as this "side
       | project" by CloudFlare and therefore has a lot more interesting
       | features than just serving static files.
        
         | youngtaff wrote:
         | Yeh, but Netlify keeps talking about the edge when they mean a
         | handful of Amazon / Google data centres
         | https://answers.netlify.com/t/is-there-a-list-of-where-netli...
         | 
         | Whereas Cloudflare really are allowing people to deploy code at
         | 100's of edge locations
        
           | EE84M3i wrote:
           | >Whereas Cloudflare really are allowing people to deploy code
           | at 100's of edge locations
           | 
           | Does cloudflare "really" deploy the code to the edge in any
           | sense (e.g pushed to edge nodes, not just cached there)? I
           | was under the impression this product uses some origin
           | (likely, several) they manage, and their cdn.
           | 
           | Also cloudflare has a good number of POPs but I thought it
           | was in the 100-200 range, not 200+
        
             | jgrahamc wrote:
             | We have hardware in more than 200 cities in 100 countries
             | globally: https://www.cloudflare.com/network/ It is very
             | definitely above 200 locations. And we own the hardware
             | there, we're not piggybacking on someone else's cloud and
             | calling it our network.
        
               | EE84M3i wrote:
               | Ah thanks, I stand corrected. That's what I get for
               | relying on the Google featured snippet for "cloudflare
               | number of POPs" for checking my memory.
               | 
               | What's the origin setup like for cloudflare pages?
        
               | elithrar wrote:
               | They have a great breakdown on their blog[1] around the
               | high-level request flow, but Workers run independently in
               | each POP/colo. They aren't "faked" / running in some more
               | centralized location.
               | 
               | Traffic only has to leave the edge if you want to fetch
               | from _your origins_ behind it, but any responses the
               | Worker generates itself are local to that edge POP.
               | Return a static response, inspect/validate a JWT, modify
               | something on the way out of the cache: all close to the
               | user.
               | 
               | Disclaimer: used to work at Cloudflare, still think it's
               | a great product.
               | 
               | [1]: https://blog.cloudflare.com/eliminating-cold-starts-
               | with-clo...
        
               | EE84M3i wrote:
               | Ah, thanks, yeah I know workers are legit at the edge,
               | but I meant pages specifically, unless pages are somehow
               | implemented on top of workers?
        
               | kentonv wrote:
               | Pages is indeed implemented on top of Workers.
        
       | WORMS_EAT_WORMS wrote:
       | I'm not really sure the answer to this but Cloudflare's beta
       | programs in general are a bit frustrating.
       | 
       | For example, Durable Objects came out a year ago, was impossible
       | to get into (check community forums and Discord, lots of people
       | eager to just tinker concept who couldn't).
       | 
       | Now, that super interesting technology that supposed to shake
       | things up a bit, has almost ZERO code samples after a FULL year
       | after announcement. I'm not exaggerating. Check GitHub search.
       | 
       | I write this comment because I could have sworn Pages came out of
       | beta already...
       | 
       | Either way, looking forward to deeper tool integration. The idea
       | of your front end and back end application getting to a point of
       | single commit is attractive.
       | 
       | Edit: Not a FULL year, 6 months or so. See note below
        
         | jgrahamc wrote:
         | Durable Objects came out in September, it hasn't been a year.
         | You can find documentation and samples here:
         | https://developers.cloudflare.com/workers/learning/using-dur...
         | 
         | We opened the beta up in March:
         | https://blog.cloudflare.com/durable-objects-open-beta/ If for
         | some reason you are having trouble getting into the beta just
         | drop me an email (jgc).
        
           | WORMS_EAT_WORMS wrote:
           | I stand corrected, 6 months or so.
           | 
           | My point about the roll out of these great products still
           | stands as a bit confusing.
           | 
           | I definitely don't have the answer and am just communicating
           | my experience.
           | 
           | I agree your team's Documentation is great.
        
       | crobibero wrote:
       | We've been using Cloudflare pages for Jellyfin's experimental
       | client[0] and it's been really nice having automatic deployments
       | on each PR and automatic master builds.
       | 
       | [0] https://github.com/jellyfin/jellyfin-vue
        
       | 03441467807 wrote:
       | Rasoiahmad
        
       | [deleted]
        
       | alberth wrote:
       | Is there any reason now to use Cloudflare "full site caching"
       | (cache everything via Page Rules) instead of this new Cloudflare
       | Pages offering for static sites?
       | 
       | I know in the past, I at least would have my entire static site
       | fully cached with Cloudflare using Page Rules.
       | 
       | What do I lose if I moved over to Cloudflare Pages? E.g. slower
       | site performance, etc?
       | 
       | https://support.cloudflare.com/hc/en-us/articles/36002102371...
       | 
       | EDIT:
       | 
       | Follow-up question, what happens if I use Cloudflare Pages and
       | then setup a Page Rule to "cache everything" from Pages?
        
         | codydh wrote:
         | In regards to your follow-up question, I've been using
         | Cloudflare Pages for a month or so now. I found that it was by
         | default faster than Netlify, and that adding a Page Rule to
         | cache everything made things even a bit faster.
         | 
         | My guess is that by default it's not fully cached at all of
         | their edge nodes, and by adding an aggressive Page Rule, the
         | edge nodes can actually cache my site (which is very small and
         | simple).
        
       | swyx wrote:
       | great launch Rita and team!
       | 
       | > Device-based resizing: To make users' experiences even
       | smoother, especially on less reliable mobile devices, we want to
       | make sure we're not sending large images that will only get
       | previewed on a small screen. Our new optimization will
       | appropriately resize the image based on whether the device is
       | mobile or desktop.
       | 
       | wait, what? i feel like this needs more details... can we opt out
       | of it if necessary? (say on a per image, or sitewide, or cookie
       | based, basis) it sounds very nice but the loss of control seems
       | concerning?
        
       | johnchristopher wrote:
       | > Getting started with Cloudflare Pages is as easy as connecting
       | your repository and selecting your framework and build commands.
       | 
       | > Once you're set up, the only magic words you'll need are `git
       | commit` and `git push`. We'll take care of building and deploying
       | your sites for you, so you won't ever have to leave your current
       | workflow.
       | 
       | > Supporting static sites is just the beginning of the journey
       | for Cloudflare Pages. With redirects support, we're starting to
       | introduce the first bit of dynamic functionality to Pages, but
       | our ambitions extend far beyond.
       | 
       | > Our long term goal with Pages is to make full-stack application
       | development as breezy an experience as static site development is
       | today. We want to make Pages the deployment target for your
       | static assets, and the APIs that make them dynamic. With Workers
       | and Durable Objects, we believe we have just the toolset to build
       | upon.
       | 
       | > We'll be starting by allowing you to deploy a Worker function
       | by including it in your /api or /functions directory. Over time,
       | we'll be introducing new ways for you to deploy Durable Objects
       | or utilize the KV namespaces in the same way.
       | 
       | > Imagine, your entire application -- frontend, APIs, storage,
       | data -- all deployed with a single commit, easily testable in
       | staging, and a single merge to deploy to production.
       | 
       | What sets it apart from Heroku ?
        
         | sofixa wrote:
         | Pages is for static hosting first, with some dynamism ( think
         | an SPA or just a static site with 1-2 dynamic things). The
         | focus is on the front-end.
         | 
         | Heroku takes your backend application code, and runs it
         | dynamically.
        
           | johnchristopher wrote:
           | So, no back-end workers. Got it, thanks.
        
             | asadlionpk wrote:
             | They have Cloudflare Workers, which is a ridiculously great
             | product on it's own.
        
       | thegeekbin wrote:
       | I'm not going to rely on Cloudflare Pages personally... It's
       | concerning to see they let free traffic in regions be broken for
       | over 8 hours _without_ redirecting traffic to another working PoP
       | as well[0].
       | 
       | 0: https://www.cloudflarestatus.com/incidents/qjwxv73chh5b
        
         | manigandham wrote:
         | Isn't traffic automatically redirected through anycast
         | networking?
        
           | thegeekbin wrote:
           | I was personally affected by it, it appears they kept the
           | announcement of the prefixes live in those datacenters but it
           | was similar to being blackholed in those POPs. It caused 8
           | hour of outages for me and many people I know who go through
           | these POPs.
           | 
           | All the free CF sites I've got were down for those 8 hours
           | via those POPs, and, I had many customers calling to ask why
           | their site was doing and had to explain "sorry, Cloudflare
           | broke just these two POPs..."
        
             | nindalf wrote:
             | I'm finding it hard to imagine a customer who can't stand a
             | couple of hours of downtime and _also_ is unwilling to pay
             | $20 /month for their website.
        
       | [deleted]
        
       | dynamite-ready wrote:
       | How much different is this product, to Cloudflare worker sites?
        
         | rita3ko wrote:
         | There's a bit of background here
         | https://developers.cloudflare.com/pages/migrations/migrating...
         | 
         | TL;DR: Workers Sites is basically an elaborate Worker template
         | (which you can modify) and allows you to deploy your sites
         | using the Wrangler CLI -- it'll take care of uploading your
         | assets and all, but you're responsible for setting up CI, etc
         | for a continuous deployment experience.
         | 
         | Cloudflare Pages, by contract, integrates directly with Github,
         | which allows us to offer a lot more features out of the box,
         | including running your build, preview URLs, etc.
         | 
         | Hope that makes sense.
        
         | manigandham wrote:
         | Worker Sites basically adds a subfolder to your project
         | containing a Worker script that gets deployed to your domain
         | and serves up your build output.
         | 
         | It's lower-level, however it's a better option if you have any
         | dynamic/API parts to your site because you can integrate all of
         | that in a single place in your Worker script.
        
       | mcraiha wrote:
       | Anyone from Cloudflare here? Are there any plans for dotnet
       | and/or deno support? I have asked this in Discord but I haven't
       | received any answers.
        
         | kentonv wrote:
         | Hi, I'm the tech lead for Workers. (I assume your question is
         | about Workers and not Pages.)
         | 
         | Unfortunately, we can't just take the dotnet CLR or deno off
         | the shelf and deploy them the way we've deployed Workers. To
         | make edge computing possible (with good performance and
         | accessible pricing), it's necessary to be able to host tens of
         | thousands of workers on one machine. That means we can't put
         | each worker in its own container. We need something much
         | lighter-weight. So, we built a custom runtime based on V8
         | isolates. That means we can only run programs built on
         | JavaScript and Wasm, and written against the specific platform
         | API we provide. (It's true that node and deno are also based on
         | V8, but we use V8 in a very different way in order to achieve
         | our scalability and security goals.)
         | 
         | More on how our tech works, and the trade-offs involved:
         | https://www.infoq.com/presentations/cloudflare-v8/
         | 
         | In order to support other languages, we basically have two
         | options:
         | 
         | * Find a way to compile/transpile them to Wasm or JavaScript
         | that works in our runtime. This works better than you'd expect
         | but it definitely has limitations. See:
         | https://blog.cloudflare.com/cloudflare-workers-announces-bro...
         | 
         | * Offer a general container hosting service, as an alternative
         | to Workers. There would have to be some down side here in terms
         | of performance or cost, so we'd still recommend using Workers
         | whenever possible. But we _could_ do this...
        
           | mcraiha wrote:
           | No, my question is about pages.
           | 
           | I want to my publish my deno project as static page. And I
           | want to publish my Blazor project as static page.
        
             | nilslice wrote:
             | You can execute a bash script as your Build Command, e.g.
             | "./pages-build.sh" which would need to be included in your
             | repo. Within this script, you can install dependencies for
             | an Ubuntu-based system.
             | 
             | Here's a great example someone wrote up for Blazor (wasm)
             | on Pages specifically:
             | https://swimburger.net/blog/dotnet/how-to-deploy-blazor-
             | weba...
        
             | kentonv wrote:
             | Oh... so you're talking about build-time dependencies?
        
           | clarkevans wrote:
           | Transpile really won't work for data intensive applications.
           | Also, for Julia, new permutations of inputs can lead to a
           | newly compiled code.. but, once compiled, that code path is
           | fast. Regardless, I'm hopeful for CloudFlare containers so I
           | could run Julia.
        
         | fastball wrote:
         | Interested to know how you are building static sites with
         | dotnet.
        
           | mcraiha wrote:
           | There are e.g. wyam and Statiq. Then there is Blazor.
        
       | patwolf wrote:
       | I end up hosting a lot of static sites on Firebase. I've tried
       | several other ways of hosting static content but usually end up
       | back at Firebase as it's simple and cheap. It does have some
       | quirks though, so I'm interested in trying this out to see how it
       | compares.
        
       | alberth wrote:
       | Dumb question ...
       | 
       | The pricing of Pages is $0/20/$200.
       | 
       | If someone already has an existing Cloudflare account on the:
       | Free ($0) / Pro ($20) / Business ($200) tier - do they get Pages
       | included in their existing plan ... or is Pages an incremental
       | cost?
        
         | rita3ko wrote:
         | Yes, it's included in the existing plan if you already have Pro
         | / Business.
        
       | GongOfFour wrote:
       | I have a specific need and I'm wondering if any of these static
       | site hosts offer a solution.
       | 
       | I have a static site I made for a friend's business and all they
       | need is the ability to switch out a PDF on the site periodically.
       | The approach I've done so far is to have a simple sinatra app
       | that is password protected and gives them an upload form that
       | replaces the pdf on the server. Do any of these hosts offer an
       | asset manager that would let my friend manage images or pdfs via
       | a simplified admin interface and then rebuild the site with the
       | new assets?
        
         | vbezhenar wrote:
         | You can use JavaScript to interact with Github and push a new
         | commit with changed PDF.
        
         | [deleted]
        
       | outcoldman wrote:
       | I personally ended up moving mostly everything to AWS. AWS
       | Amplify now simplifies hosting static websites on S3. Automatic
       | builds from GitHub, previews of PR. Route53 is there too. So I
       | can keep all the DNS records, static website, builds in one
       | place. And if I will need to add some server logic - lambdas and
       | more is there too.
       | 
       | I even build an mac/ios app to track analytics from my AWS
       | Amplify websites
       | https://www.outcoldman.com/en/archive/2021/03/14/cloudanalyt...
       | 
       | I have found about the AWS Amplify after switching to Hugo -
       | https://gohugo.io/hosting-and-deployment/hosting-on-aws-ampl...
        
       | ValentineC wrote:
       | I just created a new Pages project and deployed it in under 10
       | minutes.
       | 
       | @rita3ko, it'll be nice if we could change the linked GitHub
       | repository without having to delete and recreate a project.
       | 
       | I'm currently trying it on the staging version of a site from my
       | personal GitHub account, but I'll be moving it to an organisation
       | account soon.
       | 
       | Edit: a button or webhook to trigger a build would be great too.
       | I just changed the production branch from my "main" to "develop"
       | branch, but there's no way to rebuild it short of pushing a new
       | commit.
        
       | karlerss wrote:
       | I set up my blog on CF pages about a month ago. I guess I chose a
       | domain and did the github flow and that was it, everything
       | clicked and worked on the first try. Haven't had to open the UI
       | since.
       | 
       | I have been using CF for a few years now (dns, caching) but the
       | services they've recently launched have been especially
       | impressive (pages, stream).
        
       | mthwsjc_ wrote:
       | Reading the comments is making me much more interested in
       | Netlify, which I didn't know about. I've been hosting a static
       | site using github pages, and Cloudflare pages looks really
       | interesting.
        
       | trinovantes wrote:
       | Been using it for a few weeks on one of my side projects. Overall
       | pleased but did encounter some problems:
       | 
       | - Builds randomly fail to deploy and without notification (had to
       | push a random commit to master to trigger a new build)
       | 
       | - If using custom domain, there's no way to redirect
       | myproject.pages.dev to myproject.com so I had to use a <link
       | rel="canonical"> on the off chance Google finds my pages link. I
       | also had to use a page rule to redirect all traffic to www
       | 
       | - I'm not exactly sure how (if it's even possible) to set up a
       | staging environment so that every push to master doesn't
       | automatically deploy to production
       | 
       | - All the cache-control headers are "max-age=0, must-revalidate".
       | I had to create another page rule to edit this to 1 year max age
       | for assets that already have contenthash appended to their file
       | names
        
         | rita3ko wrote:
         | Hey there. I'm the PM for Pages. That's fair feedback (though a
         | lot could have changed even in the past few weeks, so I would
         | recommend taking another look)
         | 
         | - It's hard for me to tell what's causing the issue (the build
         | logs should give an idea of at least at which stage). One thing
         | we've added over the course of the beta is connection to GH
         | comments, which requires a new type of permission. So that
         | might be causing the failure, but also, failed builds should
         | result in a comment (and email) for notifications, depending on
         | your GH settings. All of that said, my email is rita at
         | cloudflare if you want to forward me more details, I can help
         | look into it.
         | 
         | - Creating a canonical notion of your domain is something we're
         | thinking about. Right now the preview links will set X-Robot-
         | Tag so they can't be crawled but yeah, ideally we want to give
         | you a way to remove myproject.pages.dev if you're not using it
         | 
         | - The cache-control settings are intended to keep your site
         | from serving stale content by relying on etags -- your browser
         | should still serve from cache if the asset hasn't been updated.
         | On the Cloudflare site, we have much longer TTLs.
         | 
         | Anyway, thanks for trying Pages! We're continuing to iterate on
         | it, even after GA so should only be getting better :)
         | 
         | (edit: spacing :P)
        
           | fastball wrote:
           | To add to this, when I was trying out CFP, I found it
           | annoying that there was no explicit "build" button. I changed
           | the default branch that I wanted CF to build from, but it
           | didn't automatically make a new build. And there was no
           | button I could click (like there is on Netlify) to say
           | "rebuild now".
        
           | ignoramous wrote:
           | It is great that pages.dev is now GA: That happened f.a.s.t!
           | Love the _redirect_ feature; excited about the upcoming
           | integration with Workers, KV, and Durable Objects.
           | 
           | The only thing missing is different build commands per branch
           | and ability to exclude certain branches from builds
           | altogether.
           | 
           | BTW, now that pages.dev is GA, has the _1xxx_ errors with
           | Workers when Pages are on a different subdomain, fixed? Ref:
           | https://community.cloudflare.com/t/workers-recently-
           | receivin... | Ticket: 2109407
           | 
           | "Jam harder" a nod to jam.dev? (:
           | 
           | Thanks.
           | 
           | Edit: Might want to update
           | https://developers.cloudflare.com/pages/platform/known-
           | issue...
        
             | rita3ko wrote:
             | jam.dev are good friends of ours (both founders ex-
             | cloudflare and some of my good personal friends!) :) but
             | was thinking about it more as a play on jamstack.
             | 
             | re: excluding branches -- we're actively looking into it!
             | 
             | and yes, that error has been fixed AFAIK, but let me double
             | check.
        
           | ngrilly wrote:
           | Do you plan to improve Cache-Control to make cache busting
           | possible? Otherwise, even if the browser has the resource
           | cached, there will still be a round trip to revalidate.
        
       | everybodyknows wrote:
       | Anyone here with insight on how this positions relative to
       | fly.io? (Besides having vastly greater resources backing the
       | effort)
        
       | ArtWomb wrote:
       | Congrats on releasing! Cloudflare Tunnel secure localhost public
       | URL looks like a very powerful feature. Is Cloudflare working on
       | a full "Cloud IDE" in-house? It appears all the parts are there,
       | even for just a cloud shell ;)
        
       | lovedswain wrote:
       | Gentle reminder when receiving something for free, it's useful to
       | keep in mind what the other party is receiving from you in
       | return, and in this case, from all your users through your
       | consent. I'm not sure what CloudFlare gain from offering this,
       | but traffic data would seem the most obvious angle.
       | 
       | So I guess from my perspective, I'd treat this with roughly the
       | same scepticism as a free hosting service provided by Google
       | Analytics, at least until the bigger picture is made a little
       | more clear.
        
         | nindalf wrote:
         | It's easier to understand if you're aware of their business
         | model. They have a generous free plan, but if you're building a
         | serious website and need tech support you'd be willing to pay
         | $20/month or more. That's a fair trade. This is similar to the
         | generous free/introductory tiers on other cloud providers.
        
       | jbverschoor wrote:
       | I'm not familiar with jamstack/pages at all, but I get the
       | shivers when I see this magic "_redirects" file in the root of
       | your output directory. This is just bad design. It should not be
       | in the output / public directory, in case someone misconfigures
       | something.
        
         | molf wrote:
         | It's nice because it's a very simple file format. Because it
         | resides in the output directory it makes it easy to generate
         | with static site generators.
         | 
         | Also, they probably copied the design from Netlify [1] to
         | improve compatibility and therefore make it easier for people
         | to migrate from Netlify.
         | 
         | [1] https://docs.netlify.com/routing/redirects/#syntax-for-
         | the-r...
        
           | jbverschoor wrote:
           | Yeah I understand, but there is an immense amount of scraping
           | going on for "production.env", .htaccess files etc. It's the
           | same logic that results in publicly open mongo databases.
        
             | molf wrote:
             | Genuinely curious, how could publishing a list of redirects
             | on a static website be harmful?
        
               | jbverschoor wrote:
               | It reveals site structure but more importantly, it acts
               | as an architectural foundation (location) for the future.
        
       | molf wrote:
       | Support for simple redirect rules via the `_redirects` file
       | prompted me to switch my personal site over.
       | 
       | I have found Cloudflare Pages to be really, really fast. Much
       | faster than Netlify, although they still win based on UI polish &
       | features.
        
       | FalconSensei wrote:
       | The builtin web analytics alone is a good reason for me to switch
       | from Github Pages to this!
        
       | mark_l_watson wrote:
       | Nice!! I just converted a few low volume hobby sites: simple
       | setup, and I like the simple git push to publish.
        
       ___________________________________________________________________
       (page generated 2021-04-12 23:02 UTC)