Giter Site home page Giter Site logo

xaur / block-commons Goto Github PK

View Code? Open in Web Editor NEW

This project forked from block-commons/block-commons

0.0 0.0 0.0 96.04 MB

Home Page: https://blockcommons.red

Shell 0.90% JavaScript 13.65% Python 0.81% CSS 4.32% HTML 59.65% Dockerfile 0.22% SCSS 20.45%

block-commons's Introduction

block-commons

This site was built with Hugo 0.70.0.

To build static site

$ hugo

To run dev server on http://localhost:1313

$ hugo server -D --disableFastRender

Suggested Production Deployment

This guide uses a clean installation of Ubuntu 18.04 hosted on a VPS. Ubuntu has been initialised with only a root user which is accessible via ssh.

1. Install software

Connect to the VPS as root and run the following commands to install software needed later in this guide.

apt update
apt install -y sudo nginx
apt-get install git

If you are asked to overwrite a file named /etc/sudoers, press "Y" to install the package maintainer's version.

At this stage you can verify nginx is installed correctly by entering your VSPs IP address into a web browser. The "Welcome to nginx" page should be loaded.

2. Create non-root user

Still connected as root, run the following command to create a new user. This example creates a user called jamie, but you can choose your own name.

adduser jamie

Enter a strong password and, optionally, fill in any of the additional information if you would like. This is not required and you can just hit ENTER in any field you wish to skip.

Enable usage of sudo for the new user.

usermod -aG sudo jamie

You can now disconnect from the root user, and it will not be used again during this guide.

3. Install hugo

Connect to the VPS as the newly created non-root user. We are now going to install Hugo version 0.55.6.

export VER="0.70.0"
wget https://github.com/gohugoio/hugo/releases/download/v${VER}/hugo_${VER}_Linux-64bit.deb
sudo dpkg -i hugo_${VER}_Linux-64bit.deb

If installation was successful, you should now be able to use the hugo command

hugo --help

4. Clone this repository

Still connected as the non-root user, clone this repository into a directory which can be served by nginx

sudo mkdir -p /var/www/block-commons
sudo chown -R $USER:$USER /var/www/block-commons
git clone https://github.com/block-commons/block-commons.git /var/www/block-commons

5. Build the static site

cd /var/www/block-commons
hugo

This should build the static site into a newly created directory named public/

6. Configure nginx

sudo cp /var/www/block-commons/nginx/default /etc/nginx/sites-available/default
sudo systemctl restart nginx.service

The block-commons website should now be loaded when you enter your VSPs IP address into a web browser.

Additional setup


Updating production deployment

To deploy the latest changes pushed to the master branch on GitHub, connect to the VPS as the non-root user and run the following commands

cd /var/www/block-commons
git pull
hugo

block-commons's People

Contributors

jholdstock avatar richardred0x avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.