Website of Mango Information Systems
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
config
dynamic
graphics
scaffolds
skeleton-framework @ f94d8fe
source
test
themes
.gitignore
.gitmodules
README.md
package-lock.json
package.json

README.md

mango-is-website

Website of Mango Information Systems SPRL, powered by hexo.

Blog: unless specified otherwise, blog content is published under a Creative Commons Attribution license.

Branding: All rights reserved to the copyright holder: Mango Information Systems SPRL

Installation

  1. install hexo-cli as a global dependency: npm install hexo-cli -g
  2. clone this repository git clone --recursive https://github.com/Mango-information-systems/mango-is-website.git
  3. switch to the version you would like to use cd mango-is-website; git checkout branch-or-tag-here
  4. install node dependencies: npm install
  5. create _config.yml (in project's root directory), config/test._config.yml and config/prod._config.yml files based on config/_config.yml-sample
  6. create config/dev.theme._config.yml, config/test.theme._config.yml and config/prod.theme._config.yml files, based on theme._config.yml-sample
  7. create config/test.robots.txt and config/prod.robots.txt files
  8. create dynamic/params.json, based on dynamic/params-sample.json

Development

Run npm start. This script serves a development version, while watching changes in the site content or CSS framework...

  • layouts are defined in the custom hexo theme.
  • UI framework in use is skeleton framework. It is included as a git submodule. Its content is compiled at build time (or on-the-fly during development).
  • content can be found inside directory source.
  • dynamic parts can be found inside directory dynamic.

myTagOverflow dev setup

In order to run myTagOverflow in dev environment, the site must be served from port 80 (otherwise stackExchange API auth fails). The following command forwards port 80 traffic to port 4000:

sudo iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 4000

Then myTagOverflow can be reached at the following URL: http://localhost/tools/myTagOverflow/

Build and deployment

How it works:

  • build step compiles the site in directory public
  • deploy step copies the content of directory public inside /var/www/[environment].mango-is.com
  • deploy step copies the server-side dynamic application /home/srv-node-mango/app
  • server-side application (/home/srv-node-mango/app/server.js) to be launched separately (e.g. as a systemd daemon) - currently common for test and prod if environments are hosted in the same server.

test environment

  1. build with npm run build:test
  2. deploy with npm run deploy:test

prod environment

  1. build with npm run build:prod.
  2. deploy with npm run deploy:prod.