Your Name 8 месяцев назад
Родитель
Сommit
af9d0752db
3 измененных файлов с 36 добавлено и 2 удалено
  1. 34 0
      README.md
  2. BIN
      images/simon-tatham-putty.png
  3. 2 2
      web/hugo.toml

+ 34 - 0
README.md

@@ -1,6 +1,40 @@
 # kyleguy
 There are a few things that need to be setup to have a website.  One needs a domain.  This is just a name that people use to identify something.  Google owns many domains, for example: `www.google.com`, `google.com`, `gmail.com`.  These domains have various meanings to different people, but to you `google.com` probably means a website where one can find other websites, products, services, etc on the Internet.  We need a domain.  We need a place for our website to exist, we are going to host our website at `pebbleguy.com`.  We also need a way to edit our site.  These three things are really all that we need, each might abstract some difficulties, but nothing is too complex.  For example to have a domain we need to manage the Domain Name System, it is easy albeit esoteric.
 
+## prerequisites - a thing that is the same as something that is required
+This guide was primarily written for a single person and looks complex with a a bunch of tools and screenshots and clicks and stuff, but the overall process can be accomplished under a variety of environments.  A couple tools that have binaries pre-compiled for Windows are needed because by default Windows does not provide any aid.  Thankfully there are many Windows users that have stepped in and are helpping provide the necessary solutions.  To give a brief overview of what is described in this guide here is a Debian version of this guide:
+
+```
+: "you need to add a DNS record for the domain kyleguy.rome7.com on your domain registrar"
+# --
+# Debian version of static site using Hugo
+sudo apt install hugo;
+# setup NginX configs for our webserver
+git clone https://git.pebbleguy.com/Dan/pebbleguy.com
+cd pebbleguy.com/scripts
+./certbot-wrapper.sh -h kyleguy.rome7.com -u kyle
+# Create the site
+cd /mnt/external/projects
+mkdir kyleguy && cd kyleguy && git init && touch README.md
+hugo new site web
+cd web
+git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
+echo "theme = 'ananke'" >> hugo.toml
+sudo ln -s /mnt/external/projects/kyleguy/web/public/ /mnt/external/websites/kyleguy.rome7.com
+# Commit the website and push the repository to git.pebbleguy.com
+git add --all && git commit -m'added a static site with hugo'
+git remote add origin http://git.pebbleguy.com/kyle/kyleguy.git
+git push -u origin master
+```
+
+What we can see is that the user made sure that they had a DNS record for `kyleguy.rome7.com` then installed `hugo`.  They pulled a copy of the `pebbleguy.com` repository so that they could execute the `certbot-wrapper.sh` to setup a webserver with a certificate signed by a certificate authority.  They then setup a webroot and added a theme to their static site.  Lastly they committed their site contained in a new `git` repository to `git.pebbleguy.com`.  This is basically what we are going to do in this guide but we need some extra things.  We are going to assume that the Windows user already has `git` setup and they know how to use it.  They are going to need to connect to a remote server because Windows lacks several basic API calls needed for a reliable server.  Idk is reliable is the right word.  They lack the `epoll` API and do not support `select` or `poll` and would rely on a third party [tools](https://www.cygwin.com/).  That is what I actually mean by 'reliable'.  I was saying they need to connect to a remote server which means one needs to be careful and run some commands on the Windows host and some using `SecureShell` on a remote host.  In addition files need to be synced between the local and remote side which means we need a few more tools and configs.  The installation of `Hugo` is the tiniest bit more complex, due to the differences between `Windows Powershell` the end-of-the-road 'powershell' that is installed on Windows, and `Powershell` the [actively developed](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows) but not installed on any version of Windows.  The guide tries to be a little on the verbose side, both becuase I lack clarity, also because this is just a guide hopefully details are useful, but when you fall off a cliff the guide can't catch you, it's just going to watch your inevitible tumble down the mountainside.
+
+This is supposed to be pre-requisites.  If you follow this first some you may be save yourself from difficulties later.
+
+**Windows does not have ssh-keygen, install it or a replacement:**
+
+Install 
+
 ## a place called home, or maybe webroot
 Base directory.  Home.  Root.  C Drive.  What other names are there? Maybe `A:` or `/`.  The place that is the container for the stuff.  Or the directory that holds all the files.  Folders if you like that better.  The `webroot` is a name that does not mean anything except for when you care about it.  If it were your job to organize a party you'd probably pick a place and tell everyone to meet there.  For this tiny amount of time that location is special.  It is ground zero for where the party will happen.  People who aren't at the specified location aren't at the party.  Your party isn't the only party.  In fact it might not even be the only party at the location that you picked.  The point is that you picked a location made it special because you said it was.  This is the same for a webroot.  You are just picking some arbitrary location on a disk and you are going to tell everyone if they want to party at your website they need to go there.  When you follow the instructions for the site setup you will need to tell `NginX` about this location.  I am going to pick the location and we are going to put some files there to serve up at the party.  How long can I draw out this metaphore?  Forever.
 

BIN
images/simon-tatham-putty.png


+ 2 - 2
web/hugo.toml

@@ -1,4 +1,4 @@
-baseURL = 'https://example.org/'
+baseURL = 'https://kyleguy.rome7.com/'
 languageCode = 'en-us'
-title = 'My New Hugo Site'
+title = 'kyleguy'
 theme = 'ananke'