# Website

Taking some notes regarding building a website.

### Domain

First you may need to buy and host a domain. For example, hanzheteng.com

* To check domain status, you can use [whois](https://www.whois.com/). This can provide you with some information, but not a service to host your own domain.
* To register or buy a new domain, you can use [GoDaddy](https://www.godaddy.com/) or [Aliyun](https://wanwang.aliyun.com/). They are domain service providers, and can help you host and manage this domain (including setting up DNS server).

### Jekyll Local Setup

For the latest version (22.04) of Ubuntu system, you should be able to set up everything by following this official latest tutorial: [Quick Start](https://jekyllrb.com/docs/), [Ubuntu Installation](https://jekyllrb.com/docs/installation/ubuntu/)

For Ubuntu 20, you may encountered some errors in `gem install jekyll bundler`. To address this, just to install a previous version of jekyll. Either of the following way shall work.

```
gem install jekyll -v 3.9.3
gem install jekyll --version="~> 4.2.0"
```

Then just follow the rest of [Quick Start ](https://jekyllrb.com/docs/)to compile and run the web pages locally.

### Github Pages

There are some issues with the rendering of Github Pages on the Github remote server. The webpages can build and render correctly in local environment, but not on the Internet after pushing to Github repo. Two things to change:

* In markdown source files (e.g., `index.md`), change the keyword `layout` to `layouts`. This is may be a legacy issue. Reference: [Stackoverflow question](https://stackoverflow.com/questions/39193199/build-warning-layout-requested-does-not-exist).
* In the `_config.yml` file, `baseurl` and `url` have to be set propely to a remote address. For example:&#x20;

```
baseurl: "/"
url: "http://ucr-robotics.github.io"
```

### Resources

* Website builder: [WordPress](https://wordpress.com/), [Google Sites](https://sites.google.com/)
* Website builder for hackers: [Github pages](https://pages.github.com/), [Jekyll](https://jekyllrb.com/), [Hugo](https://gohugo.io/), [Hexo](https://hexo.io/docs/index.html)
* HTML templates: [TEMPLATED](https://templated.co/)
* Jekyll templates: [Jekyll themes](https://jekyllrb.com/resources/#themes)
* Hugo templates:  [Congo](https://jpanther.github.io/congo/), [Wowchemy](https://wowchemy.com/templates/)
