Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding a bit more documentat ion #34

Merged
merged 4 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 22 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# What is this

Saga is a super small cms build for awesome webdesigners who wants to control the markup & not have to hassle with databases and other boring stuff.
Saga is a small cms build for webdesigners who wants to control the markup & not have to hassle with databases

### Retro web!

Its a try to get back to the late 90'ies and build flatfile sites that could be dropped into any ftp server ... oooh the glory days!
Its a try to get back to the late 90' and build flat sites that could be dropped into any ftp server ... oooh the glory days!

## Core Values

Expand All @@ -22,10 +22,9 @@ Its a try to get back to the late 90'ies and build flatfile sites that could be
- 11ty generating the html.
- Markdown, json and nunjucks.
- Github for storage
- Deploy on what you want (ftp / netlify / github pages).
- Netlifycms for online editing

- Tailwind for css cause devs likes it
- Vanilla js ?

---

Expand All @@ -51,68 +50,34 @@ npm run start

http://localhost:8080

3. build website in /\_site
3. build the production site

```
npm run build
```

## CMS -Netlify CMS

To make the cms editing to work locally
first run the netlify cmsproxy
Saga is build with netlify cms for online editing
To make it work work locally

```
npm run admin
```

http://localhost:8080/\_admin/

## CSS Setup

Tailwin config /tailwin.config.js setup all the specific here
https://tailwindcss.com

## js alphine

alphine is downloaded local and uses 3+
https://alpinejs.dev/
## Nunjucks

## RSS feed

Rss feed is generated with ...
TODO::
https://mozilla.github.io/nunjucks/templating.html

## Favicon
## CSS Setup

favicon is in ...
TODO::
Tailwin config
/tailwin.config.js setup all the specific here

# content template

```
---
title: my title
layout: base.njk
eleventyExcludeFromCollections: false

permalink: "mega-awesome-stuff/"
tags: post
date: Last Modified


eleventyNavigation:
key: contact
parent: about
order: 1

---
```

## Template engine

https://mozilla.github.io/nunjucks/templating.html

## Structure

### /\_site
Expand Down Expand Up @@ -142,38 +107,32 @@ This is where all the files to generate \_site is places - this is where we all

### Content

- /content/ Add all content markdown here
- /content/

Add all content markdown here

### Images

### Systempages

/systempages/ -
Images to the content is living in the /images folder

- /images/ uploaded images from cms

## CSS
### Systempages

add inline of use tailwind.css and @apply
/systempages/ -

## Config

---

- .editorconfig : 2 spaces!
- .eleventy.js : Config of eleventy
- .gitignore :
- backstop.json : setup visual regression
- .gitignore : ignores style.css + style.min.css
- .netlify.toml : setup for netlify
- .package.json
- .tailwind.config.js

## TODO

- implement 11ty menu or a simple "add links by hand or dropdown like a related item
-

## Netlifycms Setup
## Netlifycms Setup on netlify

1 Push code to github
2 Create site on netlify - get site from github
Expand All @@ -185,7 +144,7 @@ https://app.netlify.com/sites/[SITE]/settings/identity#git-gateway

## content types

#### Pages
### Pages

Pages can be used for single pages

Expand All @@ -194,7 +153,7 @@ Pages can be used for single pages
- gallery page
a page have a specfic url custom url site/foo-bar/

#### Posts
### Posts

Post can be used to create collections of data
ex blog post, products collections
Expand All @@ -212,18 +171,10 @@ post posttemplates

## saga-template-name: Post with contact form

## Image resizing

{% image imageurl 400 alt%}

## Requirements:

- node
- eleventy https://11ty.dev
- tailwindcss https://tailwindcss.com/
- Nunjucks https://mozilla.github.io/nunjucks/
- Netlifycms https://www.netlifycms.org/

```

```
- tailwindcss https://tailwindcss.com/
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions readme/snippet.njk → readme/snippet.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,23 @@ Images
{% imageBackgroundStyle "assets/img/ident.png", “150” %}

{% image image, [320, 600, 1200], "(min-width: 30em) 50vw, 100vw", "a picture", "shadow-lg", "no lazy" %}



```
---
title: my title
layout: base.njk
eleventyExcludeFromCollections: false

permalink: "mega-awesome-stuff/"
tags: post
date: Last Modified

eleventyNavigation:
key: contact
parent: about
order: 1

---
```
6 changes: 3 additions & 3 deletions src/_templates/components/gallery.njk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ simple image gallery / slider
#}
{%- if meta.env != 'prod' %}<!-- components/contactform.njk -->{%- endif -%}

<section>
<section class="">
{# Image wrapper for the gallery #}
<div class="flex overflow-x-auto scroll-smooth snap-mandatory snap-x slides scrollbar z-0">

Expand Down Expand Up @@ -55,12 +55,12 @@ simple image gallery / slider



<style>
{# <style>
.slides > div {
transition: transform 0.5s;
}

.slides {
-webkit-overflow-scrolling: touch;
}
</style>
</style> #}