gsl-statique-litterateur/var/lib/gsl/help/how-to_Tips_Advises.md

2.7 KiB

Tips and Advises

Configuration

  • CSS acronym will always be in lower case

ABBR

  • short name (HEADER): must be in CAPS LOCK (abbr: LEC : Libre en communs)
  • short name (CONTENT): must contain a space (" LEC", " LEC ", "LEC ")

Files (Images, codes, scripts...)

You can create sub-directories in DOMAIN/files or DOMAIN/images If you do so, in your article HEADER, set FILENAME with sub-dirs, but do NOT begin with /

# File put in /var/lib/gsl/domains/DOMAIN/images/dir/dir1/pic.png
image: 1 : dir/dir1/pic.png

Images: set style and target

  • You can set height only and let original width by putting "0" as width

Examples HTML Ouput according to marker "_image:" in content

# Header
image: 5 : avatar-echolib.png : echolib

# Content
_image:5:l:234:567:https://echolib.re
<a class="a-lec_image-link" href="https://echolib.re"><img class="a-lec_image a-lec_image-left" src="./images/avatar-echolib.png" alt="echolib" title="echolib" style="width:234px;height:567px;" /></a>

_image:5:http://echolib.re
<a class="a-lec_image-link" href="http//echolib.re"><img class="a-lec_image a-lec_image-center" src="./images/avatar-echolib.png" alt="echolib" title="echolib" /></a>

_image:5:l:0:567:https://echolib.re
<a class="a-lec_image-link" href="https://echolib.re"><img class="a-lec_image a-lec_image-left" src="./images/avatar-echolib.png" alt="echolib" title="echolib" style="height:567px;" /></a>

_image:5:CSS-B:128:http://echolib.re
<a class="a-lec_image-link CSS-B" href="http//echolib.re"><img class="a-lec_image CSS-B" src="./images/avatar-echolib.png" alt="echolib" title="echolib" style="width:128px;" /></a>

_image:5:CSS-A:http://echolib.re
<a class="a-lec_image-link CSS-A" href="http//echolib.re"><img class="a-lec_image CSS-A" src="./images/avatar-echolib.png" alt="echolib" title="echolib" /></a>

_image:5:+
<a class="a-lec_image-link" href="./images/avatar-echolib.png"><img class="a-lec_image a-lec_image-center" src="./images/avatar-echolib.png" alt="echolib" title="echolib" /></a>

Make (changes in your template)

If you change the content of a file in your template (script code, image, footer...), and you want ALL your articles to be updated, you will have to :

  • gsl sync
  • gsl make -F
  • gsl www add all

For only one article (myarticle).gsl:

  • gsl sync
  • gsl make -F (myarticle) (preview it first with wip server)
  • gsl www remove (myarticle)
  • gsl www add (myarticle)

Sidebar

If your remove a www or wip page, and you have put it in the sidebar, do not forget to replace it with another article. You can also have an automatic sidebar with

  • gsl sidebar latest

Stats

For local URL (i.e. /index.html (or /)), online stats will be couted only after article is in www on new check (command)