1. Clone or fork this repo: `git clone https://git.ouvaton.coop/astrolabe/SiteWebAstrolabe`
2.`cd` into the project directory and run `npm install`
3. Once all the dependencies are installed run `npm start`
4. Open your browser at `http://localhost:8080` and away you go!
### Deploy
1. Copy paste deploy.js file in two new files `deploy-preprod.js`and `deploy-prod.js`
2. Make sure to fill in correct platform information in the two files
3. Run `npm run deploy-preprod`to deploy to the pre-production platform
4. Run `npm run deploy-prod`to deploy to the production platform
## Terminal commands
### Serve the site locally
```bash
npm start
```
### Build a production version of the site
```bash
npm run prod
```
### Lint Sass
```bash
npm run sass:lint
```
### Compile Sass
```bash
npm run sass:process
```
## Content editing
All operations are based on the `src` folder as a root.
### Add a new post
A post is composed of a markdown file and optionally images.
There is two kinds of posts :
- News post
- Event post
#### Add a 'news' post
In the `posts`folder, create a new mardown file `example.md`(or copy paste one of the existing files)
Fill in the meta information :
1.`title:` the post heading
2.`date:` the publication date, if further than current date the post won't appear in the posts list until current date is met.
3.`type:` 'news' for news post
Then add the post content in plain mardown language. You can add images to your post, make sure to place them in the `images`folder.
#### Add an 'event' post
In the `posts`folder, create a new mardown file `example-date.md`(or copy paste one of the existing files). Use date in post file name to identify them easily (not mandatory).
Fill in the meta information :
1.`title:` the post heading
2.`date:` the publication date, if further than current date the post won't appear in the posts list until current date is met.