日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

图解机器学习 github_使用Github和Cloudflare建立网站的图解指南

發(fā)布時間:2023/11/29 编程问答 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 图解机器学习 github_使用Github和Cloudflare建立网站的图解指南 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

圖解機(jī)器學(xué)習(xí) github

by Karan Thakkar

由Karan Thakkar

使用GitHub和Cloudflare建立網(wǎng)站的插圖指南 (An illustrated guide to setting up your website using GitHub and Cloudflare)

You should read this if…

如果...,您應(yīng)該閱讀此內(nèi)容

  • You want to setup custom redirects or other server configuration for free

    您想免費設(shè)置自定義重定向或其他服務(wù)器配置

  • You want to get your site on HTTPS but don’t know where to start

    您想在HTTPS上獲取您的網(wǎng)站,但不知道從哪里開始
  • You’re overwhelmed with the amount of choices out there (like Netlify, Surge, BitBalloon, Now)

    您不知所措,那里的選擇太多了(如Netlify , Surge , BitBalloon , Now )

  • 為什么選擇Github? (Why Github?)

  • Easy to setup and get started with Github Pages

    易于設(shè)置并開始使用Github Pages
  • Instant deploys on pushing new code

    即時部署以推送新代碼
  • 為什么選擇Cloudflare? (Why Cloudflare?)

  • It’s free

    免費
  • It comes with out-of-the-box support for SSL (HTTPS). (Here’s why HTTPS matters.)

    它具有對SSL(HTTPS)的開箱即用的支持。 ( 這就是HTTPS很重要的原因 。)

  • Super simple DNS management

    超級簡單的DNS管理
  • Ability to set browser cache expiration for assets

    可以設(shè)置資產(chǎn)的瀏覽器緩存到期時間

  • Auto minify your static assets

    自動縮小您的靜態(tài)資產(chǎn)
  • Custom page rules for setting up redirects, always HTTPS, etc.

    用于設(shè)置重定向(始終為HTTPS等)的自定義頁面規(guī)則。
  • HTTP2/SPDY for supported browsers

    適用于支持的瀏覽器的HTTP2 / SPDY

  • Allows for setting up HSTS (HTTP Strict Transport Security)

    允許設(shè)置HSTS (HTTP嚴(yán)格傳輸安全性)

  • 在我們開始之前,您需要做一些事情: (Before we get started you will need a few things:)

  • A Github account

    一個Github帳戶

  • A Cloudflare account

    Cloudflare帳戶

  • Access to a custom domain. You can buy it from any Domain Name Registrar like: Namecheap, GoDaddy, BigRock, etc.

    訪問自定義域。 您可以從任何域名注冊商處購買它,例如: Namecheap , GoDaddy , BigRock等。

  • If all this piqued your interest, then let’s get started!

    如果這一切引起了您的興趣,那就開始吧!

    第1步 :使用您的代碼創(chuàng)建Github存儲庫 (Step 1: Create Github repo with your code)

    • Go to https://pages.github.com

      轉(zhuǎn)到https://pages.github.com

    • Select the option Project Site to find the instructions on how to create a basic page from scratch or a custom theme

      選擇選項“ 項目站點”以查找有關(guān)如何從頭開始或自定義主題創(chuàng)建基本頁面的說明。

    步驟2.為存儲庫設(shè)置Github Pages (Step 2. Setup Github Pages for the repository)

    Go to Settings for your repository. In the Github Pages section, choose the master branch to serve your website from. Once you’ve done that, you can go to https://<yourgithubusername>.github.io/repository to see your website in action as shown below.

    轉(zhuǎn)到存儲庫的設(shè)置 。 在Github Pages部分中,選擇master分支來服務(wù)您的網(wǎng)站。 完成此操作后,您可以轉(zhuǎn)到https:// <yourgithubuserna me> .gith u b.io/repo 的理論來查看您的網(wǎng)站的運行情況,如下所示。

    步驟3.添加自定義域 (Step 3. Add custom domain)

    Add the custom domain that you have bought and save it. Your website is now ready with your own custom domain ? WOOT! ?

    添加您購買的自定義域并保存。 您的網(wǎng)站現(xiàn)在可以使用您自己的自定義域了嗎? 哇! ?

    So, we have everything setup on Github. We’ll start with setting up Cloudflare to jazz up your website with all the powerful features I mentioned at the beginning of this post.

    因此,我們在Github上進(jìn)行了所有設(shè)置。 我們將從設(shè)置Cloudflare開始,用我在本文開頭提到的所有強大功能來增強您的網(wǎng)站。

    步驟4:在Cloudflare上設(shè)置您的域 (Step 4: Setup your domain on Cloudflare)

    Login to Cloudflare. If you are using it for the first time, you should see a screen like the image shown above. If you have used it before, you can click on the Add Site option in the navigation bar on the top right to add a new domain. Enter the domain you want to manage and click on Begin Scan.

    登錄到Cloudflare 。 如果是第一次使用它,應(yīng)該會看到如上圖所示的屏幕。 如果您以前使用過它,則可以單擊右上角導(dǎo)航欄中的“ 添加站點”選項來添加新域。 輸入您要管理的域,然后單擊開始掃描

    步驟5:為您的域設(shè)置DNS記錄 (Step 5: Setup DNS Records for your domain)

    In this step, we inform Cloudflare to point our domain to the Github Pages server using two A Record DNS entries: 1. 192.30.252.1532. 192.30.252.154

    在這一步中,我們通知Cloudflare使用兩個A Record DNS條目將我們的域指向Github Pages服務(wù)器 :1. 192.30.252.1532。 192.30.252.154

    Once you have set this up, all requests to your custom domain i.e. yourcustomdomain.com will be routed to your website on Github on Step 3.

    設(shè)置完成后,到您的自定義域(即yourcustomdomain.com)的所有請求都將在第3步被路由到Github上的您的網(wǎng)站。

    There’s one more step involved before we move on to the next stage. Oftentimes, you would want to use a subdomain like www for your website, i.e. www.yourcustomdomain.com For this, you will need to add a CNAME record DNS entry which will point your subdomain(www) to your apex domain(@).

    在我們進(jìn)入下一個階段之前,還需要再走一步。 通常,您可能希望使用像www這樣的子域作為您的網(wǎng)站,即www.yourcustomdomain.com 。為此,您需要添加一個CNAME記錄 DNS條目,它將您的子域(www)指向頂點域(@)。

    Once you have set this up, all requests to your custom subdomain i.e. www.yourcustomdomain.com will be routed to your website on Github on Step 3.

    設(shè)置完成后,所有對您的自定義子域(例如www)的請求。 yourcustomdomain.com將在第3步被路由到您在Github上的網(wǎng)站。

    NOTE: Don’t try to go access your custom domain right away. It won’t work. We have only done the Cloudflare to Github setup. We still have to do the DNS Registrar -> Cloudflare setup. This will come up in Step 7.

    注意:不要嘗試立即訪問您的自定義域。 它不會工作。 我們僅完成了Cloudflare至Github的設(shè)置。 我們?nèi)匀槐仨氝M(jìn)行DNS注冊器-> Cloudflare設(shè)置。 這將在第 7 頁中提出

    Click Continue to go to the next step.

    單擊繼續(xù)轉(zhuǎn)到下一步。

    第6步:選擇免費Cloudflare計劃 (Step 6: Choose the Free Cloudflare plan)

    The Free plan for Cloudflare provides a lot of sophisticated options as discussed in the Why Cloudflare? section at the beginning.

    Cloudflare的免費計劃提供了許多復(fù)雜的選項,如為何選擇Cloudflare? 開頭部分。

    Click Continue to go to the next step.

    單擊繼續(xù)轉(zhuǎn)到下一步。

    步驟7:在DNS注冊器上更新名稱服務(wù)器 (Step 7: Update Nameservers on your DNS Registrar)

    Once you’re on this page, keep it open in one tab and open your DNS Registrar’s (the place from where your bought your domain) site in another. If you’re using one of the following registrar’s then the links to understand how to change Nameserver are:

    進(jìn)入此頁面后,在一個選項卡中將其保持打開狀態(tài),然后在另一個選項卡中打開DNS注冊器(您購買域名的地方)站點。 如果您使用以下注冊商之一,則可以了解如何更改名稱服務(wù)器的鏈接是:

  • Bigrock

    巨巖

  • Namecheap

    便宜貨

  • GoDaddy

    去吧爸爸

  • You need to replace the existing Nameservers in your Domain settings with the one’s on the Cloudflare page that is open in the other tab.

    您需要將“域”設(shè)置中的現(xiàn)有名稱服務(wù)器替換為在另一個標(biāo)簽中打開的Cloudflare頁面上的名稱服務(wù)器。

    YASSS! You’ve successfully setup your custom domain to use Cloudflare as a DNS provider. You can go to the Overview option on the top and you will find that it is still waiting for your Nameserver change to be processed.

    YASSS! 您已經(jīng)成功設(shè)置了自定義域,以將Cloudflare用作DNS提供程序。 您可以轉(zhuǎn)到頂部的Overview選項,您會發(fā)現(xiàn)它仍在等待名稱服務(wù)器更改被處理。

    Once the Overview tab says Status: Active, you can now try to visit your site using your custom domain, AND IT SHOULD JUST WORK! ??

    一旦“ 概述”標(biāo)簽顯示“ 狀態(tài):有效” 您現(xiàn)在可以嘗試使用您的自定義域訪問您的網(wǎng)站, 并且應(yīng)該可以正常使用! ??

    步驟8:配置縮小 (Step 8: Configure Minification)

    In the Speed setttings, in the Auto Minify section, choose the option to auto-minify everything: Javascript, CSS, HTML. This will be done by Cloudflare on-the-fly once and then cached. Whenever any of your assets change, Cloudflare will do this again for you.

    在“ 速度設(shè)置”的“ 自動縮小”部分中,選擇用于自動縮小所有內(nèi)容的選項:Javascript,CSS,HTML。 這將由Cloudflare即時完成,然后進(jìn)行緩存。 每當(dāng)您的資產(chǎn)發(fā)生任何變化時,Cloudflare都會為您再次執(zhí)行此操作。

    The advantage of minification is that the size of the file delivered to your browser is a lot less since it strips off unwanted spaces and comments.

    最小化的優(yōu)點是,傳遞到瀏覽器的文件的大小要小得多,因為它會去除不必要的空格和注釋。

    步驟9:配置瀏覽器緩存過期 (Step 9: Configure Browser Cache Expiration)

    If you scroll down on the same page as Auto Minify, you will find the Browser Cache Expiration section. It should be set to 30 days/1 month, ideally, for WebpageTest to not give you a warning. What this time indicates is that, once your site is loaded in any browser, then the browser will not request any assets for a second time until the Browser Cache time period expires for those assets.

    如果您在與Auto Minify相同的頁面上向下滾動,則會找到Browser Cache Expiration部分。 最好將其設(shè)置為30天/ 1個月,以使WebpageTest不向您發(fā)出警告。 這一次的意思是,一旦您的網(wǎng)站加載到任何瀏覽器中,然后瀏覽器將不會再次請求任何資產(chǎn),直到這些資產(chǎn)的瀏覽器緩存時間段到期為止。

    Before we move on to the next step, please check the Crypto settings on Cloudflare. It should say Active Certificate in the SSL section. (Note: Try reloading the page. Sometimes it doesn’t update). In the next two steps, we are going to make your site serve via HTTPS always. For that to work without any problems, it is important that you have an active certificate on Cloudflare.

    在繼續(xù)進(jìn)行下一步之前,請檢查Cloudflare上的Crypto設(shè)置。 它應(yīng)該在SSL部分顯示Active Certificate 。 ( 注意:嘗試重新加載頁面。有時它不會更新 )。 在接下來的兩個步驟中,我們將使您的網(wǎng)站始終通過HTTPS服務(wù)。 為了使它正常工作,在Cloudflare上擁有有效的證書很重要。

    步驟10:配置頁面規(guī)則 (Step 10: Configure Page Rules)

    In this step, we are going to do two things:

    在這一步中,我們將做兩件事:

  • Redirect all requests for www.yourcustomdomain.com to yourcustomdomain.com

    將對 www.yourcustomdomain.com的所有請求重定向到yourcustomdomain.com

  • Redirect all requests for http://yourcustomdomain.com to https://yourcustomdomain.com

    將對http://yourcustomdomain.com的所有請求重定向到https://yourcustomdomain.com

  • Go to the Page Rules setting and click on Create Page Rule.

    轉(zhuǎn)到頁面規(guī)則設(shè)置,然后單擊創(chuàng)建頁面規(guī)則。

    For handling the www.yourcustomdomain.com to yourcustomdomain.com redirect, replace tweetify.io with yourcustomdomain.com name. Click Save and Deploy.

    要處理www.yourcustomdomain.comyourcustomdomain.com重定向,請將tweetify.io替換為yourcustomdomain.com名稱。 單擊保存并部署

    For handling the http://yourcustomdomain.com to https://yourcustomdomain.com redirect, replace tweetify.io with yourcustomdomain.com name. Click Save and Deploy.

    要處理從http://yourcustomdomain.comhttps://yourcustomdomain.com重定向,請將tweetify.io替換為yourcustomdomain.com名稱。 單擊保存并部署

    步驟11:配置HSTS (Step 11: Configure HSTS)

    Go to the Crypto settings and scroll down to the HTTP Strict Transport Security (HSTS) section. Click on Enable HSTS. This will ask you to acknowledge that you know what you are doing. Before you select I understand, let me tell you why we need to enable this setting:

    轉(zhuǎn)到“ 加密設(shè)置”,然后向下滾動到“ HTTP嚴(yán)格傳輸安全性(HSTS)”部分。 單擊啟用HSTS 。 這將要求您確認(rèn)您知道自己在做什么。 在選擇我理解之前,讓我告訴您為什么我們需要啟用此設(shè)置:

    If a user has opened your website in the past, from then onwards whenever the user tries to access your website, they will always be taken to the HTTPS version of your site. This makes your site load a little faster on subsequent visits because the HTTP to HTTPS redirect happens on the client and not via the Cloudflare Page Rule that we added in Step 10.

    如果用戶過去曾經(jīng)打開過您的網(wǎng)站,從此以后,只要該用戶嘗試訪問您的網(wǎng)站,他們將始終被帶到您網(wǎng)站的HTTPS版本。 這使您的站點在后續(xù)訪問中的加載速度更快,因為HTTP到HTTPS重定向是在客戶端而不是通過我們在步驟10中添加的Cloudflare頁面規(guī)則進(jìn)行的。

    Once you go to the next step, you should enable all the settings as shown below. You can read more details about these options here and here

    轉(zhuǎn)到下一步后,應(yīng)啟用所有設(shè)置,如下所示。 您可以在此處和此處閱讀有關(guān)這些選項的更多詳細(xì)信息

    That’s it. You’re all set to show off your website to the world! ?? If you found this useful, please ?? it and share it.

    而已。 你們都準(zhǔn)備向全世界展示您的網(wǎng)站! ?? 如果您發(fā)現(xiàn)此功能有用,請??并分享。

    Karan Thakkar is the Frontend Lead at Crowdfire - Your super-smart marketing sidekick. His article has been previously featured on The Huffington Post. He likes trying out new technologies in his spare time and has built Tweetify (using React Native) and Show My PR’s (using Golang).

    Karan Thakkar是Crowdfire的前端主管- 您的超級智能營銷伙伴 。 他的文章以前曾在《赫芬頓郵報 》上發(fā)表過 。 他喜歡在業(yè)余時間嘗試新技術(shù),并建立了Tweetify (使用React Native)和Show My PR (使用Golang)。

    Other articles written by him:

    他寫的其他文章:

    How I grew from 300 to 5k followers in just 3 weeks#GrowthHacking my Twitter account for @Crowdfire Twitter Premier Leagueblog.markgrowth.comUsing the Let’s Encrypt Certbot to get HTTPS on your Amazon EC2 NGINX boxLet’s Encrypt is a new Certificate Authority which provides free SSL certificates (up to a certain limit per week). It…medium.freecodecamp.com

    我從300如何成長為5K的追隨者在短短三周內(nèi), #GrowthHacking我的Twitter賬戶@Crowdfire Twitter的英超 blog.markgrowth.com 使用讓我們加密Certbot以獲得HTTPS在您的Amazon EC2 NGINX盒 讓我們加密是一個新的證書頒發(fā)機(jī)構(gòu),其提供免費的SSL證書(每周最多有一定限制)。 它… medium.freecodecamp.com

    翻譯自: https://www.freecodecamp.org/news/an-illustrated-guide-for-setting-up-your-website-using-github-cloudflare-5a7a11ca9465/

    圖解機(jī)器學(xué)習(xí) github

    總結(jié)

    以上是生活随笔為你收集整理的图解机器学习 github_使用Github和Cloudflare建立网站的图解指南的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。