#WORK[COMPOSER_TARGETS_DEFAULT][LICENSE.html README.html] #WORK[COMPOSER_TARGETS][LICENSE.html README.html] #WORK[IGNORES_LIST][+Composer +test +testing .Composer-v3.1 .cache .composer.log .composer.mk .composer.tmp .config .gitattributes .gitconfig .gitignore .sources .wget-hsts] #WORK[IGNORES_EXT][] #WORK[EXPORTS_LIST][LICENSE.html README.docx README.epub README.html README.pdf README.revealjs.html README.site.html index.html] #WORK[EXPORTS_EXT][LICENSE.md README.md] #WORK[COMPOSER_TARGETS_DEFAULT][LICENSE.html README.html] #WORK[COMPOSER_TARGETS][README.site.html README.html README.pdf README.epub README.revealjs.html README.docx LICENSE.html] #WORK[IGNORES_LIST][+Composer +test +testing .Composer-v3.1 .cache .composer.log .composer.mk .composer.tmp .config .gitattributes .gitconfig .gitignore .sources .wget-hsts] #WORK[IGNORES_EXT][] #WORK[EXPORTS_LIST][LICENSE.html README.docx README.epub README.html README.pdf README.revealjs.html README.site.html index.html] #WORK[EXPORTS_EXT][LICENSE.md README.md] — title: “Composer CMS: Content Make System” date: v3.1 (2024-08-10) author: Gary B. Genett —

Composer CMS

#WORK[COMPOSER_TARGETS_DEFAULT][LICENSE.html README.html] #WORK[COMPOSER_TARGETS][README.site.html README.html README.pdf README.epub README.revealjs.html README.docx LICENSE.html] #WORK[IGNORES_LIST][+Composer +test +testing .Composer-v3.1 .cache .composer.log .composer.mk .composer.tmp .config .gitattributes .gitconfig .gitignore .sources .wget-hsts] #WORK[IGNORES_EXT][] #WORK[EXPORTS_LIST][LICENSE.html README.docx README.epub README.html README.pdf README.revealjs.html README.site.html index.html] #WORK[EXPORTS_EXT][LICENSE.md README.md] | Composer Icon | “Creating Made Simple.” | :— | :— | Composer CMS v3.1 | License: GPL | Gary B. Genett | composer@garybgenett.net

– Formats: webpage / html / pdf / epub / revealjs.html / docx

Overview

Composer is a simple but powerful CMS based on [Pandoc], [Bootstrap] and [GNU Make]. It is a document and website build system that processes directories or individual files in [Markdown] format.

Traditionally, CMS stands for Content Management System. Composer is designed to be a Content Make System. Written content is vastly easier to manage as plain text, which can be crafted with simple editors and tracked with revision control. However, professional documentation, publications, and websites require formatting that is dynamic and feature-rich.

[Pandoc] is an extremely powerful document conversion tool, and is a widely used standard for processing [Markdown] into other formats. While it has reasonable defaults, there are a large number of options, and additional tools are required for some formats and features.

Composer consolidates all the necessary components, simplifies the options, and prettifies the output formats, all in one place. It also serves as a build system, so that large repositories can be managed as documentation archives or published as [Static Websites].

Composer Screenshot

Quick Start

Use make help to get started:

#WORK[COMPOSER_TARGETS_DEFAULT][LICENSE.html README.html] #WORK[COMPOSER_TARGETS][README.site.html README.html README.pdf README.epub README.revealjs.html README.docx LICENSE.html] #WORK[IGNORES_LIST][+Composer +test +testing .Composer-v3.1 .cache .composer.log .composer.mk .composer.tmp .config .gitattributes .gitconfig .gitignore .sources .wget-hsts] #WORK[IGNORES_EXT][] #WORK[EXPORTS_LIST][LICENSE.html README.docx README.epub README.html README.pdf README.revealjs.html README.site.html index.html] #WORK[EXPORTS_EXT][LICENSE.md README.md] make [-f …/Makefile] [variables] . make [-f …/Makefile] [variables]

#WORK[COMPOSER_TARGETS_DEFAULT][LICENSE.html README.html] #WORK[COMPOSER_TARGETS][README.site.html README.html README.pdf README.epub README.revealjs.html README.docx LICENSE.html] #WORK[IGNORES_LIST][+Composer +test +testing .Composer-v3.1 .cache .composer.log .composer.mk .composer.tmp .config .gitattributes .gitconfig .gitignore .sources .wget-hsts] #WORK[IGNORES_EXT][] #WORK[EXPORTS_LIST][LICENSE.html README.docx README.epub README.html README.pdf README.revealjs.html README.site.html index.html] #WORK[EXPORTS_EXT][LICENSE.md README.md] Create documents from source [Markdown] files (see Formatting Variables):

make README.html
make Composer-v3.1.Manual.html c_list="README.md LICENSE.md"

Save a persistent configuration (see [Recommended Workflow] and [Configuration Settings]):

make template >.composer.mk
$EDITOR .composer.mk
    override COMPOSER_TARGETS := .targets Composer-v3.1.Manual.html
    override Composer-v3.1.Manual.html := README.md LICENSE.md
make clean
make all

Recursively install and build an entire directory tree (see [Recommended Workflow]):

cd .../documents
make -f .../.Composer/Makefile init
make -f .../.Composer/Makefile install-all
make all-all

See [help-all] for full details and additional targets.

Principles

The guiding principles of Composer:

  • All source files in readable plain text
  • Professional output, suitable for publication
  • Minimal dependencies, and entirely command-line driven
  • Separate content and formatting; writing and publishing are independent
  • Inheritance and dependencies; global, tree, directory and file overrides
  • Fast; both to initiate commands and for processing to complete

Direct support for key document types (see [Document Formatting]):

  • [Static Websites]
  • [HTML]
  • [PDF]
  • [EPUB]
  • [Reveal.js Presentations]
  • [Microsoft Word & PowerPoint]

Requirements

Composer has almost no external dependencies. All needed components are integrated directly into the repository, including [Pandoc] and [YQ]. Composer does require a minimal command-line environment based on [GNU] tools, particularly [GNU Make], which is standard for all [GNU/Linux] systems. The [Windows Subsystem for Linux] for Windows and [MacPorts] for macOS both provide suitable environments.

The one large external requirement is [TeX Live], and it can be installed using the package managers of each of the above systems. It is only necessary for creating [PDF] files.

Below are the versions of the components in the repository, and the tested versions of external tools for this iteration of Composer. Use [check] to validate your system.

The versions of the integrated repositories can be changed, if desired (see [Repository Versions]).

#WORK[COMPOSER_TARGETS_DEFAULT][LICENSE.html README.html] #WORK[COMPOSER_TARGETS][README.site.html README.html README.pdf README.epub README.revealjs.html README.docx LICENSE.html] #WORK[IGNORES_LIST][+Composer +test +testing .Composer-v3.1 .cache .composer.log .composer.mk .composer.tmp .config .gitattributes .gitconfig .gitignore .sources .wget-hsts] #WORK[IGNORES_EXT][] #WORK[EXPORTS_LIST][LICENSE.html README.docx README.epub README.html README.pdf README.revealjs.html README.site.html index.html] #WORK[EXPORTS_EXT][LICENSE.md README.md] | Repository | Commit | License | :— | :— | :— | [Pandoc] | 3.8.3 | GPL | [YQ] | v4.52.2 | MIT | [Bootstrap] | v5.3.8 | MIT | [Bootlint] | v1.1.0 | MIT | [Bootswatch] | v5.3.8 | MIT | [Font Awesome] | 7.1.0 | MIT / CC-BY | [Water.css] | d950cbc9f8607521587f | MIT | [Markdown Viewer] | 5.3 | MIT | [Markdown Themes] | 6b3643d0f703727d8472 | None | [Reveal.js] | 5.2.1 | MIT | [Google Firebase] | v15.5.1 | MIT

Project Composer Version
[GNU Bash] 5.2.37
– [GNU Coreutils] 9.7
– [GNU Findutils] 4.10.0
– [GNU Sed] 4.9
[GNU Make] 4.4.1
– [Pandoc] 3.8.3
– [YQ] 4.52.2
– [TeX Live] [PDF] 2024 3.141592653-2.6-1.40.26
Supporting Tools:
– [Git SCM] 2.49.1
– [GNU Diffutils] 3.12
– [Rsync] 3.4.1

[Markdown Viewer] is included both for its CSS stylesheets, and for real-time rendering of [Markdown] files as they are being written. To install, follow the instructions in the README.md.

[Google Firebase] is only necessary when configured for uploading via the [export-all] and [export-site] targets. Use the [+update]-firebase-tools target to build the Composer version with [npm]. #WORK[COMPOSER_TARGETS_DEFAULT][LICENSE.html README.html] #WORK[COMPOSER_TARGETS][README.site.html README.html README.pdf README.epub README.revealjs.html README.docx LICENSE.html] #WORK[IGNORES_LIST][+Composer +test +testing .Composer-v3.1 .cache .composer.log .composer.mk .composer.tmp .config .gitattributes .gitconfig .gitignore .sources .wget-hsts] #WORK[IGNORES_EXT][] #WORK[EXPORTS_LIST][LICENSE.html README.docx README.epub README.html README.pdf README.revealjs.html README.site.html index.html] #WORK[EXPORTS_EXT][LICENSE.md README.md]

Composer CMS v3.1 :: Help

make [-f .../Makefile] [variables] <filename>.<extension>
make [-f .../Makefile] [variables] <target>

Composer Variables

Formatting Variables

Variable Purpose Value
[c_site] Enable [Static Websites]
[c_lang] Language for document headers en-US
[c_logo] Logo image ([HTML] formats) logo.img
[c_icon] Icon image ([HTML] formats) icon.img
[c_css] Location of CSS file theme.html-default.css
[c_type] Desired output format html
[c_base] Base of output file
[c_list] List of input files(s)
[c_toc] Table of contents depth
[c_level] Chapter/slide header level 2
[c_margin] Size of margins ([PDF]) 0.8in
[c_options] Custom [Pandoc] options
Values: [c_type] Format Extension
html HyperText Markup Language *.html
pdf Portable Document Format *.pdf
epub Electronic Publication *.epub
revealjs Reveal.js Presentation *.revealjs.html
docx Microsoft Word *.docx
pptx Microsoft PowerPoint *.pptx
text Plain Text (well-formatted) *.txt
markdown Markdown (for testing) *.md.txt
* Passed directly to [Pandoc] *.[c_type]
  • Aliases:
    • [c_site] ~ s
    • [c_type] ~ t
    • [c_base] ~ b
    • [c_list] ~ l
  • Special [c_css] values:
    • css_alt – Use the alternate default stylesheet
    • 0 – Revert to the [Pandoc] default
  • *Special [c_toc] value:
    • 0 – List all headers, and number sections
  • *Special [c_level] value:
    • 0 – Varies by [c_type] (see [c_level])
  • An empty [c_margin] value enables individual margins:
    • *c_margin_top
    • *c_margin_bottom
    • *c_margin_left
    • *c_margin_right

Control Variables

Variable Purpose Value
[MAKEJOBS] Parallel processing threads 1 (makejobs)
[COMPOSER_DEBUGIT] Use verbose output (debugit)
[COMPOSER_DOCOLOR] Enable title/color sequences (boolean)
[COMPOSER_INCLUDE] Include all: .composer.mk 1 (boolean)
[COMPOSER_DEPENDS] Sub-directories first: [all] (boolean)
[COMPOSER_MAXLIST] Limit output of file lists 100 (maxlist)
[COMPOSER_KEEPING] Log entries / cache files 100 (keeping)
[COMPOSER_LOGFILE] Timestamped command log .composer.log
[COMPOSER_FILEEXT] Markdown file extension .md
[COMPOSER_TARGETS] See: [all]/[clean] [config]/[targets]
[COMPOSER_SUBDIRS] See: [all]/[clean]/[install] [config]/[targets]
[COMPOSER_EXPORTS] See: [c_site]/[export] [config]
[COMPOSER_IGNORES] See: [c_site]/[export] [config]
  • Aliases:
    • [MAKEJOBS] ~ J
    • [COMPOSER_DEBUGIT] ~ V
    • [COMPOSER_DOCOLOR] ~ C
    • [COMPOSER_KEEPING] ~ K
  • (makejobs) – empty is disabled / number of threads / 0 is no limit
  • (debugit) – empty is disabled / any value enables / 0 is full tracing
  • (maxlist) – empty is none / number to display / 0 is no limit
  • (keeping) – empty is none / number to keep / 0 is no limit
  • (boolean) – empty is disabled / any value enables

Helper Variables

Variable Purpose Value
[CURDIR] [GNU Make] current directory $PWD :: make
[COMPOSER_CURDIR] Detects [COMPOSER_INCLUDE] [CURDIR] :: .composer.mk
[COMPOSER_DIR] Location of Composer …/composer
[COMPOSER_ROOT] Topmost level of current tree …/composer
[COMPOSER_EXPORT] Target: [export] [COMPOSER_ROOT]/+Composer (mk)
[COMPOSER_LIBRARY] Target: [site]/[site-library] (yml)
[COMPOSER_SRC] Repositories and downloads [COMPOSER_DIR]/.sources
[COMPOSER_ART] Composer supporting files [COMPOSER_DIR]/_artifacts
[COMPOSER_DAT] [Pandoc] supporting files [COMPOSER_ART]/pandoc
[COMPOSER_TMP] Cache and working directory [CURDIR]/.composer.tmp

Export Variables

Variable Purpose Value
[C_EXPORT_DESTDIR] Export directory: [export] [COMPOSER_EXPORT]
[C_EXPORT_GITREPO] [Git] repository location
[C_EXPORT_GITBNCH] Branch name for commits
[C_EXPORT_FIRACCT] [Google Firebase] account
[C_EXPORT_FIRPROJ] Project name for upload

Composer Websites

Website Configuration

[YAML].site-config Purpose Default
#WORKING:YML#####123 #WORKING:YML###############123 #WORKING:YML#########123
[navbars.brand] Navigation bar branding text null
[navbars.homepage] Link to website homepage null
[navbars.search.name] #WORK null
[navbars.search.site] #WORK null
[navbars.search.call] #WORK null
[navbars.search.form] #WORK null
[navbars.copyright] #WORK null
[navbars.composer] #WORK 1
#WORKING:YML#####123 #WORKING:YML###############123 #WORKING:YML#########123
[pages.css_overlay] #WORK dark
[pages.copy_protect] #WORK null
[pages.header] #WORK [ “null” ]
[pages.footer] #WORK [ “null” ]
#WORKING:YML#####123 #WORKING:YML###############123 #WORKING:YML#########123
[cols.break] #WORK lg
[cols.scroll] #WORK 1
[cols.order] #WORK [ 1, 2, 3 ]
[cols.reorder] #WORK [ 1, 3, 2 ]
[cols.size] #WORK [ 3, 7, 2 ]
[cols.resize] #WORK [ 6, 12, 6 ]
#WORKING:YML#####123 #WORKING:YML###############123 #WORKING:YML#########123
[dates.parse] #WORK [ “2006-01-02T15:04:05-07:00”, “2006-01-02 15:04 -07:00”, “2006-01-02”, “January 2, 2006”, “January 2, 2006 3:04 PM MST -07:00” ]
[dates.display] #WORK 2006-01-02
[dates.library] #WORK 2006
[dates.timezone] #WORK -08:00

Website Helpers

[YAML].site-helpers Purpose Default
#WORKING:YML#####123 #WORKING:YML###############123 #WORKING:YML#########123
[metainfo.display] #WORK ::
[metainfo.empty] #WORK (no metadata)
#WORKING:YML#####123 #WORKING:YML###############123 #WORKING:YML#########123
[metalist.title.title] #WORK “Title:
[metalist.title.display] #WORK “Title: <
[metalist.title.empty] #WORK (no title)
[metalist.date.title] #WORK “Year:
[metalist.date.display] #WORK “Date: <
[metalist.date.empty] #WORK (no date)
[metalist.author.title] #WORK “Author:
[metalist.author.display] #WORK “Authors: <
[metalist.author.empty] #WORK (no author)
#WORKING:YML#####123 #WORKING:YML###############123 #WORKING:YML#########123
[readtime.display] #WORK Reading time: words,
[readtime.wpm] #WORK 220
#WORKING:YML#####123 #WORKING:YML###############123 #WORKING:YML#########123
[redirect.title] #WORK “Moved To:
[redirect.display] #WORK This link has been permanently moved to:
[redirect.exclude] #WORK [ “null” ]
[redirect.time] #WORK 5

Website Library

[YAML].site-library Purpose Default
#WORKING:YML#####123 #WORKING:YML###############123 #WORKING:YML#########123
[folder.name] #WORK “null”
[folder.auto_update] #WORK null
#WORKING:YML#####123 #WORKING:YML###############123 #WORKING:YML#########123
[pages.anchor_links] #WORK 1
[pages.append] #WORK [ “null” ]
#WORKING:YML#####123 #WORKING:YML###############123 #WORKING:YML#########123
[digest.title] #WORK “Latest Updates”
[digest.continue] #WORK […]
[digest.permalink] #WORK (link to full page)
[digest.chars] #WORK 1024
[digest.count] #WORK 10
[digest.expanded] #WORK 0
[digest.spacer] #WORK 1
#WORKING:YML#####123 #WORKING:YML###############123 #WORKING:YML#########123
[lists.expanded] #WORK 0
[lists.spacer] #WORK 1
#WORKING:YML#####123 #WORKING:YML###############123 #WORKING:YML#########123
[sitemap.title] #WORK “Site Map”
[sitemap.exclude] #WORK [ “null” ]
[sitemap.expanded] #WORK 0
[sitemap.spacer] #WORK 1

Composer Targets

Primary Targets

Target Purpose
[help] Basic help overview (default)
[help-all] Console version of README.md (no reference sections)
[template] Print settings template: .composer.mk
[template.yml] Print settings template: .composer.yml
[template.md] Print markdown file template
[compose] Document creation engine (see [c_type])
[site] Build [HTML] files as [Static Websites] (see [c_site])
[site-all] Do [site] recursively: [COMPOSER_SUBDIRS]
[site-force] Do [site] recursively: including [COMPOSER_LIBRARY]
[site-clean] Remove [c_site] only: [COMPOSER_LIBRARY]/[COMPOSER_TMP]
[install] Current directory initialization: Makefile
[install-all] Do [install] recursively (no overwrite)
[install-force] Recursively force overwrite of Makefile files
[clean] Remove output files: [COMPOSER_TARGETS] :: [*-clean]
[clean-all] Do [clean] recursively: [COMPOSER_SUBDIRS]
[*-clean] Any targets named this way will also be run by [clean]
[all] Create output files: [COMPOSER_TARGETS] :: [*-all]
[all-all] Do [all] recursively: [COMPOSER_SUBDIRS]
[*-all] Any targets named this way will also be run by [all]
[list] Timestamps: *[COMPOSER_FILEEXT] >> [COMPOSER_LOGFILE]

Additional Targets

Target Purpose
[+release] Upgrade all tools and supporting files to next versions
[+release-all] Also make README.* files and [Static Websites]
[+update] Update all included components (see Requirements)
[+update-all] Additionally perform all source code builds
[+update-list] Show changes made to each (see [Repository Versions])
[+update-*] Complete fetch and build for a specific component
[+debug] Diagnostics, tests targets list in [COMPOSER_DEBUGIT]
[+debug-file] Export [+debug] results to a plain text file
[check] List system packages and versions (see Requirements)
[check-all] Complete [check] package list, and system information
[config] Show values of all Composer Variables
[config-all] Complete [config], including environment variables
[config.*] Export individual Composer Variables values
[config.yml] JSON export of .composer.yml configuration
[targets] List all available targets for the current directory
[init] Create and link a .Composer in current directory
[commit] [Git] commit of current directory tree or [c_list]
[commit-all] Automatic [commit], without $EDITOR step
[export] Synchronize +Composer export of [COMPOSER_ROOT]
[export-all] Recursively, and publish to upstream hosting providers
[export-site] Publish only, without synchronizing first
[*-export] Any targets named this way will also be run by [export]
[site-library] Build or update the [COMPOSER_LIBRARY]
[site-list] [COMPOSER_LIBRARY] for current directory or [c_list]
[site-list-all] Do [site-list] for current directory tree
[site-list-list] All metadata fields and values, sorted by most used
[site-list-null] List files which are missing metadata fields
[site-list.*] Direct export of metadata or index, [c_list] searchable
[extract] Reverses [Pandoc] to export documents to markdown

Final Notes

Command Examples

Create documents from source [Markdown] files (see Formatting Variables):

make README.html
make Composer-v3.1.Manual.html c_list="README.md LICENSE.md"

Save a persistent configuration (see [Recommended Workflow] and [Configuration Settings]):

make template >.composer.mk
$EDITOR .composer.mk
    override COMPOSER_TARGETS := .targets Composer-v3.1.Manual.html
    override Composer-v3.1.Manual.html := README.md LICENSE.md
make clean
make all

Recursively install and build an entire directory tree (see [Recommended Workflow]):

cd .../documents
make -f .../.Composer/Makefile init
make -f .../.Composer/Makefile install-all
make all-all

See [help-all] for full details and additional targets.

Go Make A Thing

Happy Making!