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

https://github.com/peterszarvas94/lytepage

lytepage - generate static site with go, markdown and templ
https://github.com/peterszarvas94/lytepage

go golang mardown templ

Last synced: about 2 months ago
JSON representation

lytepage - generate static site with go, markdown and templ

Awesome Lists containing this project

README

          

# lytepage

## 1. Install

```shell
go install github.com/peterszarvas94/lytepage@latest
```

## 1. Initialize a new project

```shell
lytepage init my-app
```

## 2. Write content

`content/hello/world.md`

```txt
---
title: "Amazing article"
---

## Hello world

How awesome this site is!

Learn:

- go
- templ
```

## 3. Write template

```js
templ PostPage(post *fileutils.FileData) {


{ post.Matter.Title }



@fileutils.HtmlString(post.Html)

}
```

## 4. Generate (for static hosting)

```shell
make gen
```

The generated `public/hello/world/index.html`:

```html

Amazing article



Hello world!

How awesome this site is!

Learn:


  • go

  • templ



```

## 5. Run locally

SSR mode:

```shell
make ssr
```

Static mode:

```shell
make static
```

Now `localhost:8080/hello/world` is serving your content

Dev mode - soon!