Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/blinkk/oak-starter


https://github.com/blinkk/oak-starter

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

##

is a project powered by [Oak](https://github.com/blinkk/oak), a
CMS with website development tools and production serving.

### Setup

At a minimum, you will need:

- [Google Cloud SDK](https://cloud.google.com/sdk/docs/quickstart)
- [Node](https://github.com/nvm-sh/nvm#installing-and-updating) v14 or greater

After installing the `gcloud` command, make sure you're logged into the correct
account by running:

```bash
gcloud auth list
```

Request access to Oak's private NPM repo from [[email protected]](mailto:[email protected])
and then run the following to set up local access to the repo:

```bash
make install
```

The above command will create a `.npmrc` file which tells NPM where to find the
`@oak/oak` project and how to access it.

### Development

Start an Oak server.

```bash
make run
```

Sync global strings sheet.

```bash
make strings
```

### Style Guide

#### Use BEM for CSS names

Block elements should use lowerCamelCase instead of dash-names. Modifiers should
use --doubleDash.

```html






```

#### Use consistent naming across CSS names and Nunjucks files

For example:

* CSS name: heroSimple
* Partial file: /views/partials/heroSimple.njk
* SASS file: /src/sass/partials/_heroSimple.sass

#### Use clear names for partials

Avoid generic terms for partials where its purpose is unclear.

```html

...

...

```

Avoid reusing the same partial for layouts that are not at all similar. Opt to
create a new partial for it instead, even if the DOM structure is more or less
the same.

```html


...

...

```

#### Optimize image sizes

For PNGs and JPGs, store images on GCS and use the `|cloudImage` filter when
possible. Use in conjunction with the `picture()` macro for automatic image
resizing for each responsive breakpoint.

```yaml
myimage:
url: gs://bucket/path/to/image.png
```

```html
{% from "/views/macros/picture.njk" import picture %}



{{picture(myimage|cloudImage)}}


```