stog issueshttps://framagit.org/zoggy/stog/-/issues2018-11-22T01:58:44Zhttps://framagit.org/zoggy/stog/-/issues/22Keywords and topics in urls2018-11-22T01:58:44ZZoggyKeywords and topics in urls*Created by: leowzukw*
With [SEO](https://d1avok0lzls2w.cloudfront.net/img_uploads/anatomy-of-a-url.jpg) in mind, it could be great to be able to have keywords in urls.
This way a post named `stog013.html`, placed in the folder `post`,...*Created by: leowzukw*
With [SEO](https://d1avok0lzls2w.cloudfront.net/img_uploads/anatomy-of-a-url.jpg) in mind, it could be great to be able to have keywords in urls.
This way a post named `stog013.html`, placed in the folder `post`, with this content
``` html
<post title="Stog 0.13.0"
date="2014/10/03"
topics="stog,release"
keywords="version,tag"
published="true"
>
<p>
Release 0.13.0 of stog is available from the <page href="/install"/> page.
</p>
<sep_/>
<p>Changes:</p>
...
</post>
```
would be accessible with the url `<site-url>/post/stog/release/version/tag/stog013.html`.
It could be setted by an option in the config file like this : (for preceding example)
``` json
...
url: "folder/topics/keywords/file";
....
```
To avoid too long urls because of too many keywords, we could image a syntax like this
``` json
...
url: "folder/topics(1)/keywords(2)/file";
....
```
to take the first topic and the two first keywords.
It might be generalized to every attributes (especially dates), and even customs ones.
https://framagit.org/zoggy/stog/-/issues/25Pagination2018-11-22T01:58:44ZZoggyPagination*Created by: leowzukw*
It would be interesting to be able to put [paginations](http://foundation.zurb.com/docs/components/pagination.html) in pages. Instead of a long, not very clear page, it could be cut into several pages.
It could b...*Created by: leowzukw*
It would be interesting to be able to put [paginations](http://foundation.zurb.com/docs/components/pagination.html) in pages. Instead of a long, not very clear page, it could be cut into several pages.
It could be done with a special tag to put were we would like to cut such as `<page-cut>`.
## For instance, a page `/install.html` like this
``` xml
<page title="Installation"
>
<prepare-toc depth="2">
<toc></toc>
<section id="opam" title="Quick install with Opam">
<p>
The easiest way to install is to use <ext-a href="http://opam.ocaml.org">OPAM</ext-a>.
Install Opam, then, as a regular user, fetch and install an OCaml version and install Stog.
The whole can be done with the following opam commands:
</p>
<command-line>
$ opam init --comp=4.02.1 # or 4.02.2
$ opam update
$ opam install stog
</command-line>
</section>
<page-cut/>
<section id="deps" title="Dependencies">
<p>
To build Stog, you will need:
</p>
<ul>
<li><ext-a href="http://caml.inria.fr/">OCaml >= 4.02.1</ext-a>,</li>
<li><ext-a href="http://zoggy.github.io/ocf/">Ocf >= 0.3.0</ext-a>.</li>
<li><ext-a href="http://erratique.ch/software/xmlm">Xmlm >= 1.1.0</ext-a>,</li>
<li><ext-a href="http://projects.camlcity.org/projects/ocamlnet.html">OCamlnet >= 3.6</ext-a>.</li>
<li><ext-a href="https://github.com/johnwhitington/ppx_blob">ppx_blob >= 0.1</ext-a>,</li>
<li><ext-a href="http://zoggy.github.io/xtmpl/">Xtmpl >= 0.12</ext-a>,</li>
<li><ext-a href="http://zoggy.github.io/higlo/">Higlo >= 0.4</ext-a>.</li>
</ul>
<p>
</subsection>
</section>
</prepare-toc>
</page>
```
Would be translated in to files like this `/install/1` and `/install/2` with this content:
### /install/1
``` xml
<page title="Installation - 1"
>
<prepare-toc depth="2">
<toc></toc>
<section id="opam" title="Quick install with Opam">
<p>
The easiest way to install is to use <ext-a href="http://opam.ocaml.org">OPAM</ext-a>.
Install Opam, then, as a regular user, fetch and install an OCaml version and install Stog.
The whole can be done with the following opam commands:
</p>
<command-line>
$ opam init --comp=4.02.1 # or 4.02.2
$ opam update
$ opam install stog
</command-line>
</section>
<page-cut/>
</prepare-toc>
</page>
```
### /install/2
``` xml
<page title="Installation - 2"
>
<prepare-toc depth="2">
<toc></toc>
<section id="deps" title="Dependencies">
<p>
To build Stog, you will need:
</p>
<ul>
<li><ext-a href="http://caml.inria.fr/">OCaml >= 4.02.1</ext-a>,</li>
<li><ext-a href="http://zoggy.github.io/ocf/">Ocf >= 0.3.0</ext-a>.</li>
<li><ext-a href="http://erratique.ch/software/xmlm">Xmlm >= 1.1.0</ext-a>,</li>
<li><ext-a href="http://projects.camlcity.org/projects/ocamlnet.html">OCamlnet >= 3.6</ext-a>.</li>
<li><ext-a href="https://github.com/johnwhitington/ppx_blob">ppx_blob >= 0.1</ext-a>,</li>
<li><ext-a href="http://zoggy.github.io/xtmpl/">Xtmpl >= 0.12</ext-a>,</li>
<li><ext-a href="http://zoggy.github.io/higlo/">Higlo >= 0.4</ext-a>.</li>
</ul>
<p>
</subsection>
</section>
</prepare-toc>
</page>
```
The text on the page would of course be longer when paginating, but here I cut for clarity.
## Ideas to do this
- Generalize the [multi-doc module](https://zoggy.github.io/stog/plugins/multi-doc.html).
- Allow to template it with variable like page-number, total-number-of-page
- The [way Hugo does that](http://gohugo.io/extras/pagination/) may be quite interesting
- There could be an option to cut automatically on certain tags such as `<section>`
https://framagit.org/zoggy/stog/-/issues/35Writing <i class="…"/> instead of <i class="…"></i>2018-11-22T01:58:44ZZoggyWriting <i class="…"/> instead of <i class="…"></i>*Created by: leowzukw*
It seems that with the last release (0.16) of Stog, the writer changed its behavior.
Instead of writing, for instance `<i class="…"></i>`, it writes `<i class="…"/>`. This causes a lot of problem with some CSS (s...*Created by: leowzukw*
It seems that with the last release (0.16) of Stog, the writer changed its behavior.
Instead of writing, for instance `<i class="…"></i>`, it writes `<i class="…"/>`. This causes a lot of problem with some CSS (such as [FontAwesome](http://fontawesome.io/)).
Thus, it would be great to be able, at least, to disable this behavior and come back to the old one, with a setting in the configuration file for instance.
https://framagit.org/zoggy/stog/-/issues/10Allow the use of 100% markdown documents2018-11-22T01:58:44ZZoggyAllow the use of 100% markdown documents*Created by: tautologico*
There is some support for markdown inside a specific tag, and depending on an external processor.Some people may feel the XML markup of stog is a bit heavy if you want to concentrate more on writing content (it...*Created by: tautologico*
There is some support for markdown inside a specific tag, and depending on an external processor.Some people may feel the XML markup of stog is a bit heavy if you want to concentrate more on writing content (it's definitely my case), so I think it would be good to have full support for markdown-only documents, ideally without needing an external processor. Most other static site generators support a lighter markup format (often markdown).
One possibility would be to look to the file extension and if it is .md or .mdown, translate the markdown syntax to the standard stog XML notation, which shouldn't be too hard. For inclusion of tags in markdown files some additional notation could be used, like YAML. Other static site generators use markdown + yaml (jekyll itself and many similar programs).
https://framagit.org/zoggy/stog/-/issues/38Cannot set doctype: stog chokes on <!DOCTYPE2018-11-22T01:58:44ZZoggyCannot set doctype: stog chokes on <!DOCTYPE*Created by: mfp*
Attempts to add a doctype to the template end up in errors like the following:
```
Computing level 0
Error when applying module base on level 0: ...*Created by: mfp*
Attempts to add a doctype to the template end up in errors like the following:
```
Computing level 0
Error when applying module base on level 0:
File "site/.stog/templates/page.tmpl", line 1, characters 1-3: Parse error: Unexpected characters: <!
```
That's the same error we get when using `Xtmpl_xml.from_file` instead of `Xtmpl_xml.doc_from_file`, so I'd guess stog is calling the wrong function (i.e., reading a tree list instead of a `Xtmpl_xml.doc`) at some point.
stog 0.16.0
xtmpl 0.13.0
If that's the wrong way to give the doctype, how is one supposed to do it after 0813a38ce ?