BLOGC-MAKE(1)

πŸ“¦
version 0.20.1^20240602.b1ae9c9 Β· 3 versions
, in fedora 43

πŸ’– BLOGC-MAKE(1) πŸ’–

okay bestie, welcome to the blogc Manual, and specifically to blogc-make β€” the little build tool that runs the whole show. sit down, grab a boba, we're doing this πŸ§‹βœ¨


🌸 NAME 🌸

blogc-make β€” a simple build tool for blogc


✨ SYNOPSIS ✨

blogc-make [-V] [-f FILE] [RULE ...]
blogc-make [-h|-v]

πŸ¦‹ DESCRIPTION πŸ¦‹

so blogc-make is, like, a simple build tool for blogc websites. no cap. it reads a blogcfile(5) and then generates your output files using blogc(1) plus some predefined rules β€” and those rules are genuinely useful enough for most common use cases. like, they ate. πŸ’…

if you wanna know the tea about the file format, go read blogcfile(5). that's where it all lives.


πŸŽ€ OPTIONS πŸŽ€

  • -D β€” builds for the development environment. this is the one you want when you're loading local, non-optimized assets for development purposes. it adds two global variables to all blogc(1) calls: MAKE_ENV_DEV=1 and MAKE_ENV=dev. cute, right?
  • -V β€” activates verbose mode, which gives you way more details of the commands that run. it's giving "tell me everything" energy πŸ”
  • -f FILE β€” reads FILE as the blogcfile.
  • -v β€” show program name, version, and exit. bye πŸ‘‹
  • -h β€” show help message and exit.

🌈 HELPER RULES 🌈

these are the little guys that keep the whole operation running 🫢

⭐ all

Run all build rules. this is the default rule, so if you just run blogc-make with nothing else, this is what you get. main character energy tbh πŸ‘‘

⭐ clean

Clean built files and empty directories in the output directory. it's giving spring cleaning 🧹✨

⭐ runserver

Run blogc-runserver(1) (if it's available) pointing at the output directory, watching for changes in the source files and rebuilding as needed. it literally never sleeps. 😭

this rule accepts some arguments, in the following format:

runserver:host=127.0.0.1,port=8080,threads=20

the values in the example are the default values, so no need to type them unless you want different ones. rebuilds are done by running blogc-make all internally.

⭐ watch

Watch for changes in the source files, rebuilding as needed. yes bestie, it's watching. always watching. πŸ‘€

rebuilds are done by running blogc-make all internally.

⭐ atom_dump

Dump the default Atom feed template based on the current blogcfile(5) settings.

the template gets dumped to the standard output, and you can use it as a base for customized Atom feed templates. build your own, make it iconic 🌟


πŸ‘‘ BUILD RULES πŸ‘‘

these are the actual builders. every single one of them passes helper variables to blogc(1), so let's go one by one πŸ’œ

πŸ”₯ index

Build the website index from posts.

the rule passes the following helper variables to blogc(1):

  • MAKE_RULE β€” index
  • MAKE_TYPE β€” post

πŸ”₯ atom

Build the main atom feed from posts.

the rule passes the following helper variables to blogc(1):

  • MAKE_RULE β€” atom
  • MAKE_TYPE β€” atom

πŸ”₯ atom_tags

Build atom feeds for each tag from posts.

the rule passes the following helper variables to blogc(1):

  • MAKE_RULE β€” atom_tags
  • MAKE_TYPE β€” atom

πŸ”₯ pagination

Build pagination pages from posts. heads up: this rule is disabled if the posts_per_page value in blogcfile(5) is negative or 0. πŸ™ˆ

the rule passes the following helper variables to blogc(1):

  • MAKE_RULE β€” pagination
  • MAKE_TYPE β€” post

πŸ”₯ pagination_tags

Build pagination pages for each tag from posts. and same deal β€” this rule is disabled if the posts_per_page value in blogcfile(5) is negative or 0. πŸ™ˆ

the rule passes the following helper variables to blogc(1):

  • MAKE_RULE β€” pagination_tags
  • MAKE_TYPE β€” post

πŸ”₯ posts

Build individual pages for each post.

the rule passes the following helper variables to blogc(1):

  • MAKE_RULE β€” posts
  • MAKE_TYPE β€” post
  • MAKE_SLUG β€” the slug of the post being built, as provided in blogcfile

πŸ”₯ tags

Build post listings for each tag from posts.

the rule passes the following helper variables to blogc(1):

  • MAKE_RULE β€” tags
  • MAKE_TYPE β€” post

πŸ”₯ pages

Build individual pages for each page.

the rule passes the following helper variables to blogc(1):

  • MAKE_RULE β€” pages
  • MAKE_TYPE β€” page
  • MAKE_SLUG β€” the slug of the page being built, as provided in blogcfile

πŸ”₯ copy

Copy static files from the source directory to the output directory. simple, effective, slay. πŸ’…


πŸ“ FILES πŸ“

the blogc-make command expects a settings file, called blogcfile by default, or any other file passed to the -f option. blogcfile must have valid UTF-8 content. like, that's non-negotiable bestie.

the blogc-make command will read any files listed on the blogcfile, and may write files to the configured output directory.


🧚 ENVIRONMENT 🧚

  • BLOGC β€” path to the blogc(1) binary. if it's not provided, the blogc binary in $PATH will be used.
  • BLOGC_RUNSERVER β€” path to the blogc-runserver(1) binary. if it's not provided, the blogc-runserver binary in $PATH will be used, if available.
  • OUTPUT_DIR β€” path to the directory where blogc-make should write (or instruct blogc(1) to write) output files.

any other environment variables are inherited by blogc(1) and blogc-runserver(1), when called by blogc-make.


πŸ’œ EXAMPLES πŸ’œ

build all files:

$ blogc-make

or

$ blogc-make all

clean built files:

$ blogc-make clean

πŸ’€ BUGS πŸ’€

please report any issues to: https://github.com/blogc/blogc

not me asking you to file a bug report, but like, please do it, it helps 🫢

🌸 AUTHOR 🌸

Rafael G. Martins <rafael@rafaelmartins.eng.br>


⭐ SEE ALSO ⭐

blogc(1), blogc-runserver(1), blogcfile(5)


okay that's the whole page, bestie!! πŸ’– written by Rafael G. Martins and dated January 2025, and now lovingly retold for you. go build something iconic, ily, bye πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from