is-a-dev-docs

is-a.dev Documentation

git clone https://github.com/notamitgamer/is-a-dev-docs.git
· rebuilt hourlyOpen on GitHub
root / src / guides / github-pages.md

github-pages.md (2590B)


      1 ---
      2 order: 2000
      3 label: GitHub Pages
      4 icon: mark-github
      5 tags: guides
      6 ---
      7 
      8 ## Setting up GitHub pages with an is-a.dev subdomain
      9 
     10 This guide will walk you through the process of setting up a GitHub Pages site and pointing your is-a.dev subdomain to it.
     11 
     12 ### Creating a GitHub Pages repository
     13 
     14 First, you'll need to create a site on GitHub Pages. Follow the instructions in the [GitHub Pages Getting Started Guide](https://docs.github.com/en/pages/getting-started-with-github-pages).
     15 
     16 ### Creating the domain file
     17 
     18 Create a JSON file inside `domains` directory (`domains/subdomain.json`) with the following content and submit a pull request:
     19 
     20 ```json
     21 {
     22     "owner": {
     23         "username": "github-username"
     24     },
     25     "records": {
     26         "CNAME": "github-username.github.io"
     27     }
     28 }
     29 ```
     30 
     31 ### Configuring
     32 
     33 - After the pull request is merged, you may see a **404** error on `subdomain.is-a.dev` or the wrong site. To fix this issue, go to your GitHub pages repository and navigate to: **Settings > GitHub pages > Custom Domain** and add `subdomain.is-a.dev` in the given field. *Only do this **after** your pull request is merged.*
     34 - Check the **Enforce HTTPS** checkbox below the custom domain input.
     35 - Wait some time and your site should be live!
     36 
     37 ## Verifying your is-a.dev Subdomain with GitHub Pages
     38 
     39 ### Get your verification string
     40 
     41 1. Navigate to GitHub, press your profile icon at the top right, and press `Settings`.
     42 
     43 ![](../media/github_pages_verification/step_1.png)
     44 
     45 2. Press `Pages`.
     46 
     47 ![](../media/github_pages_verification/step_2.png)
     48 
     49 3. Press `Add a domain`.
     50 
     51 ![](../media/github_pages_verification/step_3.png)
     52 
     53 4. In the field that appears, type your is-a.dev subdomain name (e.g. `myname.is-a.dev`) and press `Add domain`.
     54 
     55 ![](../media/github_pages_verification/step_4.png)
     56 
     57 5. Copy the hostname and the verification string.
     58 
     59 ![](../media/github_pages_verification/step_5.png)
     60 
     61 ### Create the domain file
     62 
     63 Create a JSON file inside the `domains/` directory called `domains/hostname.subdomain.json` using the hostname you copied in step 5 and subdomain (`subdomain.is-a.dev`) with the following content and submit a pull request:
     64 
     65 ```json
     66 {
     67     "owner": {
     68         "username": "github-username"
     69     },
     70     "records": {
     71         "TXT": "github-verification-string"
     72     }
     73 }
     74 ```
     75 
     76 ### Configuration
     77 
     78 After your pull request has been merged, repeat the steps to get the verification string and press the `Verify` button.
     79 If it shows an error such as `Unable to verify your domain`, try waiting a few minutes (sometimes up to 24 hours) as the DNS records may not have propagated yet.