https://github.com/ninjasort/metalpress-cli
CLI for Metalpress (Official)
https://github.com/ninjasort/metalpress-cli
Last synced: 3 months ago
JSON representation
CLI for Metalpress (Official)
- Host: GitHub
- URL: https://github.com/ninjasort/metalpress-cli
- Owner: ninjasort
- License: mit
- Created: 2016-08-30T04:30:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-05T02:09:34.000Z (about 8 years ago)
- Last Synced: 2024-12-27T23:13:17.499Z (5 months ago)
- Language: JavaScript
- Size: 160 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# metalpress-cli [](https://www.npmjs.com/package/metalpress-cli) [](https://travis-ci.org/axisdefined/metalpress-cli) [](https://codecov.io/gh/axisdefined/metalpress-cli/branch/themes)
CLI for Metalpress (Official)
## Structure and Templating
metalpress works from a specific directory structure. It contains a `templates` and `src` directory. Within the src directory it will load data from `data` as `yaml` or `json` files. You can create folders for collections and use markdown files for pages. You should store all assets in `assets`.
For templating, metalpress uses liquid. You can learn more about the [syntax here](https://github.com/leizongmin/tinyliquid).
Here's an example structure:
```sh
├── package.json
├── src
│ ├── data
│ ├── site.yaml
│ ├── projects.json
│ ├── assets
│ ├── sass
│ ├── img
│ ├── fonts
│ ├── js
│ ├── index.js
│ ├── index.md
│ ├── pages
│ ├── about.md
│ └── posts
│ ├── 2016-08-25-how-to-use-metalpress.md
├── templates
│ ├── _includes
│ ├── header.liquid
│ ├── footer.liquid
│ └── _layouts
│ ├── home.liquid
```### Installation
```sh
npm install metalpress-cli -g
```### CLI Usage
#### Initialize a New Project
> Prompts a series of questions and creates a new `.metalpress` config.
```sh
metalpress init
```#### Start a Browser-sync Server
> Serve the project on automatically assigned browser-sync port. (default: http://localhost:3000)
```
metalpress serve
```#### Deploy a Project
To deploy your site, you'll need to have your `aws.json` set up. It includes:
```
{
"key":"AWS_ACCESS_KEY_HERE",
"secret":"AWS_SECRET_KEY_HERE",
"stagingBucket":"staging.example.com",
"productionBucket":"example.com"
}
```> Deploy a `dist` and deployed to AWS S3.
*Staging*
```
metalpress deploy
```*Production*
```
metalpress deploy -p
```