crazko / statie-web

📖 [deprecated] Documentation site for Statie - PHP Static Site Generator
2 stars 2 forks source link

Pages without ID #35

Closed alexfornuto closed 5 years ago

alexfornuto commented 5 years ago

Asking here since https://github.com/Symplify/Statie doesn't accept issues.

If I'm building a site that has unsorted static pages (docs), how can I avoid needing to add an id value to each one?

crazko commented 5 years ago

Hi Alex. If you use generators (like docs and tutorials in case of this site) you have to add also id.

Consider creating simple pages like ./source/my-doc-page.md. Should be working since this PR https://github.com/Symplify/Symplify/pull/1456.


If you have more questions about Statie, you can create issues in the main monorepo https://github.com/Symplify/Symplify/issues, just prefix the issue name with [Statie].

alexfornuto commented 5 years ago

Thanks for responding! Can you expand on how to define a "simple page" in statie.yml?

crazko commented 5 years ago

You don't have to edit statie.yml for that. Just create a markdown file and run ./vendor/bin/generate source command; e.g.:

./source/my-doc-page.md will become ./output/my-doc-page/index.html

Also, you can extend a layout, so in the source file you can have:

---
layout: "_layouts/default.twig"
title: "Foo"
---

# Foo

**bar**
alexfornuto commented 5 years ago

Thanks! BTW, issue incoming regarding Gulp.