Skip to content
CecilappPublic

About

Documentation site for the Cecil static site generator.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Repository files navigation

cecil.app

Source code of cecil.app website, generated with Cecil (obviously) and hosted by Netlify.

Netlify Status

Install

Download Cecil

curl -LO https://cecil.app/cecil.phar

Install dependencies

composer install

Usage

Contribute to the documentation

The documentation is available in docs at github.com/Cecilapp/Cecil.

Create a news entry

php cecil.phar new:page --name=news/cecil-X.Y.0-released --prefix

Preview locally

vendor/bin/tailwind-builder assets/css/tailwind.css -o assets/styles.css --watch
XDEBUG_MODE=off php cecil.phar serve -v --config=config/dev.yml

Build for production

vendor/bin/tailwind-builder assets/css/tailwind.css -o assets/styles.css --minify
php cecil.phar build

Build CSS

composer run css:build

Build translations

French strings live in translations/messages.fr.po (edited with Poedit). The compiled .mo can be regenerated without gettext tools:

composer run i18n:build

Fetch themes, components and starters data

Data are fetched from the GitHub API (requires jq):

curl -s -H 'Accept: application/vnd.github.v3+json' 'https://api.github.com/search/repositories?q=topic:cecil-theme+org:Cecilapp+fork:true+is:public+archived:false' | jq '[.items[] | {name, full_name, description, github: .html_url, license: .license.name, homepage, date: .pushed_at, default_branch, topics}] | sort_by(.date) | reverse' > data/themes.json
curl -s -H 'Accept: application/vnd.github.v3+json' 'https://api.github.com/search/repositories?q=topic:cecil-theme-component+org:Cecilapp+fork:true+is:public+archived:false' | jq '[.items[] | {name, full_name, description, github: .html_url, license: .license.name, homepage, date: .pushed_at, default_branch, topics}] | sort_by(.date) | reverse' > data/components.json
curl -s -H 'Accept: application/vnd.github.v3+json' 'https://api.github.com/search/repositories?q=topic:cecil-starter+org:Cecilapp+fork:true+is:public+archived:false' | jq '[.items[] | {name, full_name, description, github: .html_url, license: .license.name, homepage, date: .pushed_at, default_branch, topics}] | sort_by(.date) | reverse' > data/starterkits.json

Search

The site is searched client side with the FlexSearch component theme (cecil/theme-flexsearch): no service, works offline, in English and French.

Search is configured in cecil.yml, under the flexsearch key; the indexed sections are listed in the order of the result groups:

flexsearch:
  enabled: true # display the search box
  sections:
    documentation:
      limit: 5 # maximum number of results in the group
    how-to:
      limit: 3
      split: false # one record per post, not one per heading
    news:
      limit: 3
      split: false
      date: true # show the date of the post in the search results

See the theme documentation for all the options.

  • Index: /flexsearch.json (and /fr/flexsearch.json), generated at build time by the theme.
  • UI: included in the header with partials/flexsearch.html.twig; the theme stylesheet is inlined before the main CSS, and customized (colors, header trigger) in assets/css/search.css.

About

Documentation site for the Cecil static site generator.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Sponsor this project

Used by

Contributors

Languages