https://github.com/agdhruv/ncovindia
Tackling misinformation surrounding COVID-19
https://github.com/agdhruv/ncovindia
Last synced: 3 months ago
JSON representation
Tackling misinformation surrounding COVID-19
- Host: GitHub
- URL: https://github.com/agdhruv/ncovindia
- Owner: agdhruv
- Created: 2020-03-21T12:16:33.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-12T19:10:15.000Z (about 5 years ago)
- Last Synced: 2025-01-25T22:13:05.376Z (5 months ago)
- Language: JavaScript
- Homepage: https://ncovindia.com
- Size: 1.1 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ncovindia
### How to run
Initially, this was a fully client-side website. Hence, I used Jekyll to build it. A static-site generator like Jekyll allowed me to use `include`s etc. without having to use a server-side language like PHP. Whatever content had to be loaded dynamically was done just using AJAX.
Later, there was a need to use some little snippets of PHP here and there (basically, for convenience). Hence, now the site is built in a slightly complicated way.
- Run `jekyll build --watch` in the root directory.
- Normally, you would run `jekyll serve` and Jekyll would spin up a server on port `4000` where you would see the HTML page that Jekyll build for you. But now, this page has PHP and the server that Jekyll runs cannot execute PHP code.
- With `jekyll build --watch`, whenever a change is made to the source code, Jekyll will build the site and make it available to us in the `_site` directory (like it usually does).
- But now, this site has some PHP code, so it needs to be run using a PHP server.
- Run `php -S localhost:9000` on `_site`.
- This ensures that the PHP code in the site built using Jekyll is executed.
- The site will now be available on `localhost:9000`.