project('website') fs = import('fs') emacs = find_program('emacs') site = 'jturnerusa.dev' build_command = [ emacs, '@INPUT@', '-batch', '-eval', '(org-export-to-file \'html "/dev/stdout")', ] posts = files('index.org') foreach post : posts custom_target( output: fs.replace_suffix(post, '.html'), input: post, command: build_command, install: true, install_dir: '/var/www' / site, capture: true, ) endforeach subdir('blog')