hscc

Soure code of <https://hugo.soucy.cc>.
git clone git://soucy.cc/hscc.git
Log | Files | Refs

archetypes.lua (416B)


      1 local field = {
      2   url = {
      3     type = 'string',
      4     pattern = '[a-z]*://[^ >,;]*', -- Ex.: string.match('https://test.com/', '[a-z]*://[^ >,;]*'),
      5     validation = true,
      6   },
      7 
      8   template = {
      9     type = 'string',
     10   },
     11 
     12   keywords = {
     13     type = 'table',
     14     validation = true,
     15   },
     16 }
     17 
     18 return {
     19   bookmark = {
     20     fields = { field.url, field.template, field.keywords },
     21     destination = os.date('%Y') .. '/mp/,'
     22   }
     23 }