Sha256: 4ec105cc1796a847d4fd1d90efc525eeb3aee816752b38ae2b5ea1619498ae7f
Contents?: true
Size: 715 Bytes
Versions: 7
Compression:
Stored size: 715 Bytes
Contents
module Jekyll module Zettel # Scaffolder for infotype Glosse class Zeitleiste include Jekyll::Zettel def scaffold(args) return nil if args_empty?(args) slug = create_slug(args.first) file = "zeitleiste/#{slug}/index.md" return file if create_dir_defensively('Zeitleiste', slug, file).nil? create_page({ 'slug' => slug, 'title' => args.first }, file, 'zeitleiste.md') string = File.read(File.expand_path('../stubs/timeline.json', __dir__)) File.open("zeitleiste/#{slug}/timeline.json", 'w') { |out| out.write string } Jekyll.logger.info '✓', "Created zeitleiste with slug `#{slug}`" file end end end end
Version data entries
7 entries across 7 versions & 1 rubygems