[{"data":1,"prerenderedAt":1573},["ShallowReactive",2],{"docs-side-nav":3,"docs-header-nav":197,"/docs/events":270,"docs-bottom-nav":1500},{"id":4,"extension":5,"items":6,"meta":194,"stem":195,"__hash__":196},"navigation/data/navigation.json","json",[7,34,46,70,104,155,170],{"name":8,"items":9},"Getting Started",[10,13,16,19,22,25,28,31],{"title":11,"path":12},"What is Maizzle?","/docs/introduction",{"title":14,"path":15},"Installation","/docs/installation",{"title":17,"path":18},"Editor Setup","/docs/editor-setup",{"title":20,"path":21},"Compatibility","/docs/compatibility",{"title":23,"path":24},"Upgrade Guide","/docs/upgrade-guide",{"title":26,"path":27},"Resources","/resources",{"title":29,"path":30},"Glossary","/glossary",{"title":32,"path":33},"CLI","/docs/cli",{"name":35,"items":36},"Concepts",[37,40,43],{"title":38,"path":39},"Environments","/docs/environments",{"title":41,"path":42},"Tailwind CSS","/docs/tailwindcss",{"title":44,"path":45},"Build Process","/docs/build-process",{"name":47,"items":48},"Configuration",[49,52,55,58,61,64,67],{"title":50,"path":51},"CSS","/docs/configuration/css",{"title":53,"path":54},"Build","/docs/configuration/build",{"title":56,"path":57},"Server","/docs/configuration/server",{"title":59,"path":60},"Components","/docs/configuration/components",{"title":62,"path":63},"Expressions","/docs/configuration/expressions",{"title":65,"path":66},"PostHTML","/docs/configuration/posthtml",{"title":68,"path":69},"PostCSS","/docs/configuration/postcss",{"name":71,"items":72},"Development",[73,76,79,81,83,86,89,92,95,98,101],{"title":74,"path":75},"Layouts","/docs/layouts",{"title":77,"path":78},"Templates","/docs/templates",{"title":59,"path":80},"/docs/components",{"title":62,"path":82},"/docs/expressions",{"title":84,"path":85},"Tags","/docs/tags",{"title":87,"path":88},"Assets","/docs/assets",{"title":90,"path":91},"Events","/docs/events",{"title":93,"path":94},"Functions","/docs/functions",{"title":96,"path":97},"Markdown","/docs/markdown",{"title":99,"path":100},"Plaintext","/docs/plaintext",{"title":102,"path":103},"API","/docs/api",{"name":105,"items":106},"Transformers",[107,110,113,116,119,122,125,128,131,134,137,140,143,146,149,152],{"title":108,"path":109},"What are Transformers?","/docs/transformers",{"title":111,"path":112},"Filters","/docs/transformers/filters",{"title":114,"path":115},"Inline CSS","/docs/transformers/inline-css",{"title":117,"path":118},"Safe Selectors","/docs/transformers/safe-class-names",{"title":120,"path":121},"CSS Purging","/docs/transformers/purge-css",{"title":123,"path":124},"Shorthand CSS","/docs/transformers/shorthand-css",{"title":126,"path":127},"Attribute To Style","/docs/transformers/attribute-to-style",{"title":129,"path":130},"Remove Attributes","/docs/transformers/remove-attributes",{"title":132,"path":133},"Add Attributes","/docs/transformers/add-attributes",{"title":135,"path":136},"Replace Strings","/docs/transformers/replace-strings",{"title":138,"path":139},"Widow Words","/docs/transformers/widows",{"title":141,"path":142},"URL Parameters","/docs/transformers/url-parameters",{"title":144,"path":145},"Base URL","/docs/transformers/base-url",{"title":147,"path":148},"Six HEX","/docs/transformers/six-hex",{"title":150,"path":151},"Prettify","/docs/transformers/prettify",{"title":153,"path":154},"Minify","/docs/transformers/minify",{"name":156,"items":157},"Starter Components",[158,161,164,167],{"title":159,"path":160},"Spacer","/docs/components/spacer",{"title":162,"path":163},"Divider","/docs/components/divider",{"title":165,"path":166},"Button","/docs/components/button",{"title":168,"path":169},"VML","/docs/components/vml",{"name":171,"items":172},"Examples",[173,176,179,182,185,188,191],{"title":174,"path":175},"Spacers","/docs/examples/spacers",{"title":177,"path":178},"Dividers","/docs/examples/dividers",{"title":180,"path":181},"Buttons","/docs/examples/buttons",{"title":183,"path":184},"Cards","/docs/examples/cards",{"title":186,"path":187},"Grids","/docs/examples/grids",{"title":189,"path":190},"Google Fonts","/docs/examples/google-fonts",{"title":192,"path":193},"Reverse Stack","/docs/examples/reverse-stack",{},"data/navigation","lXnN10nQFMOp0U7LPKSlEiRFYPoRC0dC5rgvZn8-pes",{"id":4,"extension":5,"items":198,"meta":269,"stem":195,"__hash__":196},[199,209,214,223,236,254,260],{"name":8,"items":200},[201,202,203,204,205,206,207,208],{"title":11,"path":12},{"title":14,"path":15},{"title":17,"path":18},{"title":20,"path":21},{"title":23,"path":24},{"title":26,"path":27},{"title":29,"path":30},{"title":32,"path":33},{"name":35,"items":210},[211,212,213],{"title":38,"path":39},{"title":41,"path":42},{"title":44,"path":45},{"name":47,"items":215},[216,217,218,219,220,221,222],{"title":50,"path":51},{"title":53,"path":54},{"title":56,"path":57},{"title":59,"path":60},{"title":62,"path":63},{"title":65,"path":66},{"title":68,"path":69},{"name":71,"items":224},[225,226,227,228,229,230,231,232,233,234,235],{"title":74,"path":75},{"title":77,"path":78},{"title":59,"path":80},{"title":62,"path":82},{"title":84,"path":85},{"title":87,"path":88},{"title":90,"path":91},{"title":93,"path":94},{"title":96,"path":97},{"title":99,"path":100},{"title":102,"path":103},{"name":105,"items":237},[238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253],{"title":108,"path":109},{"title":111,"path":112},{"title":114,"path":115},{"title":117,"path":118},{"title":120,"path":121},{"title":123,"path":124},{"title":126,"path":127},{"title":129,"path":130},{"title":132,"path":133},{"title":135,"path":136},{"title":138,"path":139},{"title":141,"path":142},{"title":144,"path":145},{"title":147,"path":148},{"title":150,"path":151},{"title":153,"path":154},{"name":156,"items":255},[256,257,258,259],{"title":159,"path":160},{"title":162,"path":163},{"title":165,"path":166},{"title":168,"path":169},{"name":171,"items":261},[262,263,264,265,266,267,268],{"title":174,"path":175},{"title":177,"path":178},{"title":180,"path":181},{"title":183,"path":184},{"title":186,"path":187},{"title":189,"path":190},{"title":192,"path":193},{},{"id":271,"title":90,"body":272,"description":1493,"extension":1494,"meta":1495,"navigation":430,"path":91,"seo":1496,"sitemap":1497,"stem":1498,"__hash__":1499},"docs/docs/events.md",{"type":273,"value":274,"toc":1480},"minimark",[275,279,283,286,291,311,315,322,385,389,395,537,541,544,559,579,582,608,611,618,621,827,834,837,840,843,846,996,999,1079,1084,1095,1098,1107,1110,1113,1192,1197,1204,1207,1210,1216,1219,1344,1351,1354,1368,1422,1429,1463,1476],[276,277,90],"h1",{"id":278},"events",[280,281,282],"p",{},"When compiling your HTML emails, Maizzle goes through a series of steps like generating a Template config, rendering, or applying Transformers.",[280,284,285],{},"You can hook into the build process and manipulate it by using functions that run before or after some of these steps.",[287,288,290],"h2",{"id":289},"usage","Usage",[280,292,293,294,298,299,302,303,306,307,310],{},"You may use Events both when developing locally with the CLI ",[295,296,297],"code",{},"build"," or ",[295,300,301],{},"serve"," commands, and when using the ",[304,305,102],"a",{"href":103}," with the ",[295,308,309],{},"render()"," method.",[312,313,32],"h3",{"id":314},"cli",[280,316,317,318,321],{},"To use events with the CLI commands, add them to your ",[295,319,320],{},"config.js"," file:",[323,324,329],"pre",{"className":325,"code":326,"filename":320,"language":327,"meta":328,"style":328},"language-js shiki shiki-themes tailwind-css tailwind-css","export default {\n  beforeCreate({ config }) {\n    // do stuff with config\n  },\n}\n","js","",[295,330,331,347,366,373,379],{"__ignoreMap":328},[332,333,336,340,343],"span",{"class":334,"line":335},"line",1,[332,337,339],{"class":338},"sizJ4","export",[332,341,342],{"class":338}," default",[332,344,346],{"class":345},"sprQ5"," {\n",[332,348,350,354,357,361,364],{"class":334,"line":349},2,[332,351,353],{"class":352},"s2ImL","  beforeCreate",[332,355,356],{"class":345},"({",[332,358,360],{"class":359},"s8qYB"," config",[332,362,363],{"class":345}," })",[332,365,346],{"class":345},[332,367,369],{"class":334,"line":368},3,[332,370,372],{"class":371},"smVoC","    // do stuff with config\n",[332,374,376],{"class":334,"line":375},4,[332,377,378],{"class":345},"  },\n",[332,380,382],{"class":334,"line":381},5,[332,383,384],{"class":345},"}\n",[312,386,388],{"id":387},"api-events","API Events",[280,390,391,392,394],{},"When using the API, add events inside the object that you pass to the ",[295,393,309],{}," method:",[323,396,399],{"className":325,"code":397,"filename":398,"language":327,"meta":328,"style":328},"const Maizzle = require('@maizzle/framework')\n\nhtml = Maizzle.render(`some HTML string...`, {\n    beforeRender({ html, config, matter }) {\n      // ...\n    }\n  }\n).then(({html}) => console.log(html))\n","app.js",[295,400,401,426,432,459,482,487,493,499],{"__ignoreMap":328},[332,402,403,406,410,414,417,420,423],{"class":334,"line":335},[332,404,405],{"class":359},"const",[332,407,409],{"class":408},"sfCc6"," Maizzle ",[332,411,413],{"class":412},"sVevU","=",[332,415,416],{"class":352}," require",[332,418,419],{"class":408},"(",[332,421,422],{"class":408},"'@maizzle/framework'",[332,424,425],{"class":408},")\n",[332,427,428],{"class":334,"line":349},[332,429,431],{"emptyLinePlaceholder":430},true,"\n",[332,433,434,437,440,443,446,449,451,454,457],{"class":334,"line":368},[332,435,436],{"class":359},"html",[332,438,439],{"class":412}," =",[332,441,442],{"class":359}," Maizzle",[332,444,445],{"class":345},".",[332,447,448],{"class":352},"render",[332,450,419],{"class":408},[332,452,453],{"class":408},"`some HTML string...`",[332,455,456],{"class":345},",",[332,458,346],{"class":345},[332,460,461,464,466,469,471,473,475,478,480],{"class":334,"line":375},[332,462,463],{"class":352},"    beforeRender",[332,465,356],{"class":345},[332,467,468],{"class":359}," html",[332,470,456],{"class":345},[332,472,360],{"class":359},[332,474,456],{"class":345},[332,476,477],{"class":359}," matter",[332,479,363],{"class":345},[332,481,346],{"class":345},[332,483,484],{"class":334,"line":381},[332,485,486],{"class":371},"      // ...\n",[332,488,490],{"class":334,"line":489},6,[332,491,492],{"class":345},"    }\n",[332,494,496],{"class":334,"line":495},7,[332,497,498],{"class":345},"  }\n",[332,500,502,505,507,510,512,514,516,519,522,525,527,530,532,534],{"class":334,"line":501},8,[332,503,504],{"class":408},")",[332,506,445],{"class":345},[332,508,509],{"class":352},"then",[332,511,419],{"class":408},[332,513,356],{"class":345},[332,515,436],{"class":359},[332,517,518],{"class":345},"})",[332,520,521],{"class":359}," =>",[332,523,524],{"class":359}," console",[332,526,445],{"class":345},[332,528,529],{"class":352},"log",[332,531,419],{"class":408},[332,533,436],{"class":359},[332,535,536],{"class":408},"))\n",[287,538,540],{"id":539},"event-types","Event types",[280,542,543],{},"These are the Events that you can use in Maizzle.",[280,545,546,547,550,551,553,554,558],{},"The following ones are CLI-only - they run only when added inside the ",[295,548,549],{},"events: {}"," object in your ",[295,552,320],{}," and when you run one of the ",[304,555,557],{"href":556},"/docs/cli#development","build commands",":",[560,561,562,571],"ul",{},[563,564,565],"li",{},[304,566,568],{"href":567},"#beforecreate",[295,569,570],{},"beforeCreate",[563,572,573],{},[304,574,576],{"href":575},"#afterbuild",[295,577,578],{},"afterBuild",[280,580,581],{},"These always run, every time a Template is compiled:",[560,583,584,592,600],{},[563,585,586],{},[304,587,589],{"href":588},"#beforerender",[295,590,591],{},"beforeRender",[563,593,594],{},[304,595,597],{"href":596},"#afterrender",[295,598,599],{},"afterRender",[563,601,602],{},[304,603,605],{"href":604},"#aftertransformers",[295,606,607],{},"afterTransformers",[312,609,570],{"id":610},"beforecreate",[280,612,613,614,617],{},"Runs after the ",[304,615,616],{"href":39},"Environment config"," has been computed, but before Templates are processed. Exposes the config object so you can further customize it.",[280,619,620],{},"For example, let's use a custom highlight function for Markdown fenced code blocks:",[323,622,624],{"className":325,"code":623,"filename":320,"language":327,"meta":328,"style":328},"import Prism from 'prismjs'\n\nexport default {\n  async beforeCreate({ config }) {\n    config = Object.assign(config, {\n      markdown: {\n        markdownit: {\n          highlight: (code, lang) => {\n            lang = lang || 'html'\n            return Prism.highlight(code, Prism.languages[lang], lang)\n          }\n        }\n      }\n    })\n  }\n}\n",[295,625,626,641,645,653,669,693,702,711,734,750,791,797,803,809,817,822],{"__ignoreMap":328},[332,627,628,631,635,638],{"class":334,"line":335},[332,629,630],{"class":359},"import",[332,632,634],{"class":633},"sO1gY"," Prism",[332,636,637],{"class":345}," from",[332,639,640],{"class":359}," 'prismjs'\n",[332,642,643],{"class":334,"line":349},[332,644,431],{"emptyLinePlaceholder":430},[332,646,647,649,651],{"class":334,"line":368},[332,648,339],{"class":338},[332,650,342],{"class":338},[332,652,346],{"class":345},[332,654,655,658,661,663,665,667],{"class":334,"line":375},[332,656,657],{"class":359},"  async",[332,659,660],{"class":352}," beforeCreate",[332,662,356],{"class":345},[332,664,360],{"class":359},[332,666,363],{"class":345},[332,668,346],{"class":345},[332,670,671,674,676,679,681,684,686,689,691],{"class":334,"line":381},[332,672,673],{"class":359},"    config",[332,675,439],{"class":412},[332,677,678],{"class":359}," Object",[332,680,445],{"class":345},[332,682,683],{"class":352},"assign",[332,685,419],{"class":408},[332,687,688],{"class":359},"config",[332,690,456],{"class":345},[332,692,346],{"class":345},[332,694,695,698,700],{"class":334,"line":489},[332,696,697],{"class":408},"      markdown",[332,699,558],{"class":345},[332,701,346],{"class":345},[332,703,704,707,709],{"class":334,"line":495},[332,705,706],{"class":408},"        markdownit",[332,708,558],{"class":345},[332,710,346],{"class":345},[332,712,713,716,718,721,723,725,728,730,732],{"class":334,"line":501},[332,714,715],{"class":352},"          highlight",[332,717,558],{"class":345},[332,719,720],{"class":345}," (",[332,722,295],{"class":359},[332,724,456],{"class":345},[332,726,727],{"class":359}," lang",[332,729,504],{"class":345},[332,731,521],{"class":359},[332,733,346],{"class":345},[332,735,737,740,742,744,747],{"class":334,"line":736},9,[332,738,739],{"class":359},"            lang",[332,741,439],{"class":412},[332,743,727],{"class":359},[332,745,746],{"class":338}," ||",[332,748,749],{"class":408}," 'html'\n",[332,751,753,756,758,760,763,765,767,769,771,773,776,779,782,785,787,789],{"class":334,"line":752},10,[332,754,755],{"class":338},"            return",[332,757,634],{"class":359},[332,759,445],{"class":345},[332,761,762],{"class":352},"highlight",[332,764,419],{"class":408},[332,766,295],{"class":359},[332,768,456],{"class":345},[332,770,634],{"class":359},[332,772,445],{"class":345},[332,774,775],{"class":359},"languages",[332,777,778],{"class":408},"[",[332,780,781],{"class":359},"lang",[332,783,784],{"class":408},"]",[332,786,456],{"class":345},[332,788,727],{"class":359},[332,790,425],{"class":408},[332,792,794],{"class":334,"line":793},11,[332,795,796],{"class":345},"          }\n",[332,798,800],{"class":334,"line":799},12,[332,801,802],{"class":345},"        }\n",[332,804,806],{"class":334,"line":805},13,[332,807,808],{"class":345},"      }\n",[332,810,812,815],{"class":334,"line":811},14,[332,813,814],{"class":345},"    }",[332,816,425],{"class":408},[332,818,820],{"class":334,"line":819},15,[332,821,498],{"class":345},[332,823,825],{"class":334,"line":824},16,[332,826,384],{"class":345},[828,829,830,831,833],"alert",{},"\nUse \n",[295,832,570],{},"\n if you need to update the config only once.\n",[312,835,591],{"id":836},"beforerender",[280,838,839],{},"Runs after the Template's config has been computed, but just before it is compiled.",[280,841,842],{},"It exposes the Template's HTML and Front Matter, as well as its config.",[280,844,845],{},"For (a silly) example, let's fetch data from an API and set it as the preheader text:",[323,847,849],{"className":325,"code":848,"filename":320,"language":327,"meta":328,"style":328},"import axios from 'axios'\n\nexport default {\n  async beforeRender({ html, config, matter }) {\n    const url = 'https://baconipsum.com/api/?type=all-meat&sentences=1&start-with-lorem=1'\n\n    config.preheader = await axios(url).then(result => result.data).catch(error => 'Could not fetch preheader, using default one.')\n\n    return html\n  }\n}\n",[295,850,851,863,867,875,898,911,915,976,980,988,992],{"__ignoreMap":328},[332,852,853,855,858,860],{"class":334,"line":335},[332,854,630],{"class":359},[332,856,857],{"class":633}," axios",[332,859,637],{"class":345},[332,861,862],{"class":359}," 'axios'\n",[332,864,865],{"class":334,"line":349},[332,866,431],{"emptyLinePlaceholder":430},[332,868,869,871,873],{"class":334,"line":368},[332,870,339],{"class":338},[332,872,342],{"class":338},[332,874,346],{"class":345},[332,876,877,879,882,884,886,888,890,892,894,896],{"class":334,"line":375},[332,878,657],{"class":359},[332,880,881],{"class":352}," beforeRender",[332,883,356],{"class":345},[332,885,468],{"class":359},[332,887,456],{"class":345},[332,889,360],{"class":359},[332,891,456],{"class":345},[332,893,477],{"class":359},[332,895,363],{"class":345},[332,897,346],{"class":345},[332,899,900,903,906,908],{"class":334,"line":381},[332,901,902],{"class":359},"    const",[332,904,905],{"class":408}," url ",[332,907,413],{"class":412},[332,909,910],{"class":408}," 'https://baconipsum.com/api/?type=all-meat&sentences=1&start-with-lorem=1'\n",[332,912,913],{"class":334,"line":489},[332,914,431],{"emptyLinePlaceholder":430},[332,916,917,919,921,924,926,929,931,933,936,938,940,942,944,947,949,952,954,957,959,961,964,966,969,971,974],{"class":334,"line":495},[332,918,673],{"class":359},[332,920,445],{"class":345},[332,922,923],{"class":359},"preheader",[332,925,439],{"class":412},[332,927,928],{"class":338}," await",[332,930,857],{"class":352},[332,932,419],{"class":408},[332,934,935],{"class":359},"url",[332,937,504],{"class":408},[332,939,445],{"class":345},[332,941,509],{"class":352},[332,943,419],{"class":408},[332,945,946],{"class":359},"result",[332,948,521],{"class":359},[332,950,951],{"class":359}," result",[332,953,445],{"class":345},[332,955,956],{"class":359},"data",[332,958,504],{"class":408},[332,960,445],{"class":345},[332,962,963],{"class":352},"catch",[332,965,419],{"class":408},[332,967,968],{"class":359},"error",[332,970,521],{"class":359},[332,972,973],{"class":408}," 'Could not fetch preheader, using default one.'",[332,975,425],{"class":408},[332,977,978],{"class":334,"line":501},[332,979,431],{"emptyLinePlaceholder":430},[332,981,982,985],{"class":334,"line":736},[332,983,984],{"class":338},"    return",[332,986,987],{"class":359}," html\n",[332,989,990],{"class":334,"line":752},[332,991,498],{"class":345},[332,993,994],{"class":334,"line":793},[332,995,384],{"class":345},[280,997,998],{},"Then, you'd render it in your HTML, like so:",[323,1000,1005],{"className":1001,"code":1002,"filename":1003,"language":1004,"meta":328,"style":328},"language-hbs shiki shiki-themes tailwind-css tailwind-css","\u003Cif condition=\"page.preheader\">\n  \u003Cdiv class=\"hidden\">{{{ page.preheader }}}\u003C/div>\n\u003C/if>\n","layouts/main.html","hbs",[295,1006,1007,1033,1071],{"__ignoreMap":328},[332,1008,1009,1013,1016,1020,1022,1025,1028,1030],{"class":334,"line":335},[332,1010,1012],{"class":1011},"soJEP","\u003C",[332,1014,1015],{"class":338},"if",[332,1017,1019],{"class":1018},"sQMLp"," condition",[332,1021,413],{"class":1011},[332,1023,1024],{"class":1018},"\"",[332,1026,1027],{"class":408},"page.preheader",[332,1029,1024],{"class":1018},[332,1031,1032],{"class":1011},">\n",[332,1034,1035,1038,1041,1044,1046,1048,1051,1053,1056,1059,1061,1064,1067,1069],{"class":334,"line":349},[332,1036,1037],{"class":1011},"  \u003C",[332,1039,1040],{"class":338},"div",[332,1042,1043],{"class":1018}," class",[332,1045,413],{"class":1011},[332,1047,1024],{"class":1018},[332,1049,1050],{"class":408},"hidden",[332,1052,1024],{"class":1018},[332,1054,1055],{"class":1011},">",[332,1057,1058],{"class":408},"{{{ ",[332,1060,1027],{"class":359},[332,1062,1063],{"class":408}," }}}",[332,1065,1066],{"class":1011},"\u003C/",[332,1068,1040],{"class":338},[332,1070,1032],{"class":1011},[332,1072,1073,1075,1077],{"class":334,"line":368},[332,1074,1066],{"class":1011},[332,1076,1015],{"class":338},[332,1078,1032],{"class":1011},[280,1080,1081,1083],{},[295,1082,591],{}," runs for each Template that is going to be compiled. For performance reasons, you should only use it if you need access to the config of the Template that is about to be compiled (which includes variables from the Template's Front Matter).",[828,1085,1087,1088,1090,1091,1094],{"type":1086},"warning","\nIf you don't return the \n",[295,1089,436],{},"\n when using \n",[295,1092,1093],{},"beforeRender()","\n, the original HTML will be rendered.\n",[312,1096,599],{"id":1097},"afterrender",[280,1099,1100,1101,1103,1104,1106],{},"Runs after the Template has been compiled, but before any Transformers have been applied. Exposes the rendered ",[295,1102,436],{}," string and the ",[295,1105,688],{},", as well as the Template's Front Matter.",[280,1108,1109],{},"It's your last chance to alter the HTML or any settings in your config, before Transformers process your email template.",[280,1111,1112],{},"For example, let's disable CSS inlining:",[323,1114,1116],{"className":325,"code":1115,"filename":320,"language":327,"meta":328,"style":328},"export default {\n  afterRender({ html, config, matter }) {\n    config.css = {\n      inline: false\n    }\n\n    return html\n  }\n}\n",[295,1117,1118,1126,1147,1160,1170,1174,1178,1184,1188],{"__ignoreMap":328},[332,1119,1120,1122,1124],{"class":334,"line":335},[332,1121,339],{"class":338},[332,1123,342],{"class":338},[332,1125,346],{"class":345},[332,1127,1128,1131,1133,1135,1137,1139,1141,1143,1145],{"class":334,"line":349},[332,1129,1130],{"class":352},"  afterRender",[332,1132,356],{"class":345},[332,1134,468],{"class":359},[332,1136,456],{"class":345},[332,1138,360],{"class":359},[332,1140,456],{"class":345},[332,1142,477],{"class":359},[332,1144,363],{"class":345},[332,1146,346],{"class":345},[332,1148,1149,1151,1153,1156,1158],{"class":334,"line":368},[332,1150,673],{"class":359},[332,1152,445],{"class":345},[332,1154,1155],{"class":359},"css",[332,1157,439],{"class":412},[332,1159,346],{"class":345},[332,1161,1162,1165,1167],{"class":334,"line":375},[332,1163,1164],{"class":408},"      inline",[332,1166,558],{"class":345},[332,1168,1169],{"class":338}," false\n",[332,1171,1172],{"class":334,"line":381},[332,1173,492],{"class":345},[332,1175,1176],{"class":334,"line":489},[332,1177,431],{"emptyLinePlaceholder":430},[332,1179,1180,1182],{"class":334,"line":495},[332,1181,984],{"class":338},[332,1183,987],{"class":359},[332,1185,1186],{"class":334,"line":501},[332,1187,498],{"class":345},[332,1189,1190],{"class":334,"line":736},[332,1191,384],{"class":345},[280,1193,1194,1196],{},[295,1195,599],{}," runs for each Template, right after it has been compiled. Use it only if you need access to the config of the Template that was just compiled.",[828,1198,1087,1199,1090,1201,1094],{"type":1086},[295,1200,436],{},[295,1202,1203],{},"afterRender()",[312,1205,607],{"id":1206},"aftertransformers",[280,1208,1209],{},"Runs after all Transformers have been applied, just before the final HTML is returned.",[280,1211,1212,1213,1215],{},"It exposes the same options as ",[295,1214,1203],{},", so you can do further adjustments to the HTML, or read some config settings.",[280,1217,1218],{},"For example, maybe you don't like the minifier that Maizzle includes, and you disabled it in your config so that you can use your own:",[323,1220,1222],{"className":325,"code":1221,"filename":320,"language":327,"meta":328,"style":328},"import Minifier from 'imaginary-minifier'\n\nexport default {\n  minify: false,\n  afterTransformers({ html, config, matter }) {\n    if (!config.minify) {\n      return Minifier.minify(html)\n    }\n\n    return html\n  },\n}\n",[295,1223,1224,1236,1240,1248,1261,1282,1305,1322,1326,1330,1336,1340],{"__ignoreMap":328},[332,1225,1226,1228,1231,1233],{"class":334,"line":335},[332,1227,630],{"class":359},[332,1229,1230],{"class":633}," Minifier",[332,1232,637],{"class":345},[332,1234,1235],{"class":359}," 'imaginary-minifier'\n",[332,1237,1238],{"class":334,"line":349},[332,1239,431],{"emptyLinePlaceholder":430},[332,1241,1242,1244,1246],{"class":334,"line":368},[332,1243,339],{"class":338},[332,1245,342],{"class":338},[332,1247,346],{"class":345},[332,1249,1250,1253,1255,1258],{"class":334,"line":375},[332,1251,1252],{"class":408},"  minify",[332,1254,558],{"class":345},[332,1256,1257],{"class":338}," false",[332,1259,1260],{"class":345},",\n",[332,1262,1263,1266,1268,1270,1272,1274,1276,1278,1280],{"class":334,"line":381},[332,1264,1265],{"class":352},"  afterTransformers",[332,1267,356],{"class":345},[332,1269,468],{"class":359},[332,1271,456],{"class":345},[332,1273,360],{"class":359},[332,1275,456],{"class":345},[332,1277,477],{"class":359},[332,1279,363],{"class":345},[332,1281,346],{"class":345},[332,1283,1284,1287,1289,1292,1294,1296,1299,1302],{"class":334,"line":489},[332,1285,1286],{"class":338},"    if",[332,1288,720],{"class":408},[332,1290,1291],{"class":338},"!",[332,1293,688],{"class":359},[332,1295,445],{"class":345},[332,1297,1298],{"class":359},"minify",[332,1300,1301],{"class":408},") ",[332,1303,1304],{"class":345},"{\n",[332,1306,1307,1310,1312,1314,1316,1318,1320],{"class":334,"line":495},[332,1308,1309],{"class":338},"      return",[332,1311,1230],{"class":359},[332,1313,445],{"class":345},[332,1315,1298],{"class":352},[332,1317,419],{"class":408},[332,1319,436],{"class":359},[332,1321,425],{"class":408},[332,1323,1324],{"class":334,"line":501},[332,1325,492],{"class":345},[332,1327,1328],{"class":334,"line":736},[332,1329,431],{"emptyLinePlaceholder":430},[332,1331,1332,1334],{"class":334,"line":752},[332,1333,984],{"class":338},[332,1335,987],{"class":359},[332,1337,1338],{"class":334,"line":793},[332,1339,378],{"class":345},[332,1341,1342],{"class":334,"line":799},[332,1343,384],{"class":345},[828,1345,1087,1346,1090,1348,1094],{"type":1086},[295,1347,436],{},[295,1349,1350],{},"afterTransformers()",[312,1352,578],{"id":1353},"afterbuild",[280,1355,1356,1357,1360,1361,1367],{},"Runs after all Templates have been compiled and output to disk. The ",[295,1358,1359],{},"files"," parameter will contain the paths to all the files inside the ",[304,1362,1364],{"href":1363},"/docs/configuration/build#path",[295,1365,1366],{},"build.output.path"," directory.",[323,1369,1371],{"className":325,"code":1370,"filename":320,"language":327,"meta":328,"style":328},"export default {\n  afterBuild({ files, config }) {\n    console.log(files)\n  }\n}\n",[295,1372,1373,1381,1399,1414,1418],{"__ignoreMap":328},[332,1374,1375,1377,1379],{"class":334,"line":335},[332,1376,339],{"class":338},[332,1378,342],{"class":338},[332,1380,346],{"class":345},[332,1382,1383,1386,1388,1391,1393,1395,1397],{"class":334,"line":349},[332,1384,1385],{"class":352},"  afterBuild",[332,1387,356],{"class":345},[332,1389,1390],{"class":359}," files",[332,1392,456],{"class":345},[332,1394,360],{"class":359},[332,1396,363],{"class":345},[332,1398,346],{"class":345},[332,1400,1401,1404,1406,1408,1410,1412],{"class":334,"line":368},[332,1402,1403],{"class":359},"    console",[332,1405,445],{"class":345},[332,1407,529],{"class":352},[332,1409,419],{"class":408},[332,1411,1359],{"class":359},[332,1413,425],{"class":408},[332,1415,1416],{"class":334,"line":375},[332,1417,498],{"class":345},[332,1419,1420],{"class":334,"line":381},[332,1421,384],{"class":345},[280,1423,1424,1425,1428],{},"Using it with the Starter, ",[295,1426,1427],{},"maizzle build production"," will output:",[323,1430,1432],{"className":325,"code":1431,"language":327,"meta":328,"style":328},"[\n  'build_production/images/maizzle.png',\n  'build_production/promotional.html',\n  'build_production/transactional.html'\n]\n",[295,1433,1434,1439,1446,1453,1458],{"__ignoreMap":328},[332,1435,1436],{"class":334,"line":335},[332,1437,1438],{"class":408},"[\n",[332,1440,1441,1444],{"class":334,"line":349},[332,1442,1443],{"class":408},"  'build_production/images/maizzle.png'",[332,1445,1260],{"class":345},[332,1447,1448,1451],{"class":334,"line":368},[332,1449,1450],{"class":408},"  'build_production/promotional.html'",[332,1452,1260],{"class":345},[332,1454,1455],{"class":334,"line":375},[332,1456,1457],{"class":408},"  'build_production/transactional.html'\n",[332,1459,1460],{"class":334,"line":381},[332,1461,1462],{"class":408},"]\n",[828,1464,1465,1467,1468,1471,1472,1475],{"type":1086},[295,1466,578],{},"\n is available only when using the \n",[295,1469,1470],{},"maizzle build","\n CLI command and not with the \n",[304,1473,102],{"href":1474},"/docs/api/","\n.\n",[1477,1478,1479],"style",{},"html pre.shiki code .sizJ4, html code.shiki .sizJ4{--shiki-light:#EC4899;--shiki-dark:#EC4899}html pre.shiki code .sprQ5, html code.shiki .sprQ5{--shiki-light:#44403C;--shiki-dark:#44403C}html pre.shiki code .s2ImL, html code.shiki .s2ImL{--shiki-light:#00BF99;--shiki-dark:#00BF99}html pre.shiki code .s8qYB, html code.shiki .s8qYB{--shiki-light:#3730A3;--shiki-dark:#3730A3}html pre.shiki code .smVoC, html code.shiki .smVoC{--shiki-light:#94A3B8;--shiki-light-font-style:italic;--shiki-dark:#94A3B8;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sfCc6, html code.shiki .sfCc6{--shiki-light:#1D4ED8;--shiki-dark:#1D4ED8}html pre.shiki code .sVevU, html code.shiki .sVevU{--shiki-light:#35393E;--shiki-dark:#35393E}html pre.shiki code .sO1gY, html code.shiki .sO1gY{--shiki-light:#2563EB;--shiki-dark:#2563EB}html pre.shiki code .soJEP, html code.shiki .soJEP{--shiki-light:#CBD5E1;--shiki-dark:#CBD5E1}html pre.shiki code .sQMLp, html code.shiki .sQMLp{--shiki-light:#0EA5E9;--shiki-dark:#0EA5E9}",{"title":328,"searchDepth":349,"depth":349,"links":1481},[1482,1486],{"id":289,"depth":349,"text":290,"children":1483},[1484,1485],{"id":314,"depth":368,"text":32},{"id":387,"depth":368,"text":388},{"id":539,"depth":349,"text":540,"children":1487},[1488,1489,1490,1491,1492],{"id":610,"depth":368,"text":570},{"id":836,"depth":368,"text":591},{"id":1097,"depth":368,"text":599},{"id":1206,"depth":368,"text":607},{"id":1353,"depth":368,"text":578},"Using lifecycle hooks to tap into the email build process.","md",{},{"title":90,"description":1493},{"loc":91},"docs/events","nhr4h2Xn2QUUxawEUME_G7t2ynb9yda9BEDyUvaLqFE",{"id":4,"extension":5,"items":1501,"meta":1572,"stem":195,"__hash__":196},[1502,1512,1517,1526,1539,1557,1563],{"name":8,"items":1503},[1504,1505,1506,1507,1508,1509,1510,1511],{"title":11,"path":12},{"title":14,"path":15},{"title":17,"path":18},{"title":20,"path":21},{"title":23,"path":24},{"title":26,"path":27},{"title":29,"path":30},{"title":32,"path":33},{"name":35,"items":1513},[1514,1515,1516],{"title":38,"path":39},{"title":41,"path":42},{"title":44,"path":45},{"name":47,"items":1518},[1519,1520,1521,1522,1523,1524,1525],{"title":50,"path":51},{"title":53,"path":54},{"title":56,"path":57},{"title":59,"path":60},{"title":62,"path":63},{"title":65,"path":66},{"title":68,"path":69},{"name":71,"items":1527},[1528,1529,1530,1531,1532,1533,1534,1535,1536,1537,1538],{"title":74,"path":75},{"title":77,"path":78},{"title":59,"path":80},{"title":62,"path":82},{"title":84,"path":85},{"title":87,"path":88},{"title":90,"path":91},{"title":93,"path":94},{"title":96,"path":97},{"title":99,"path":100},{"title":102,"path":103},{"name":105,"items":1540},[1541,1542,1543,1544,1545,1546,1547,1548,1549,1550,1551,1552,1553,1554,1555,1556],{"title":108,"path":109},{"title":111,"path":112},{"title":114,"path":115},{"title":117,"path":118},{"title":120,"path":121},{"title":123,"path":124},{"title":126,"path":127},{"title":129,"path":130},{"title":132,"path":133},{"title":135,"path":136},{"title":138,"path":139},{"title":141,"path":142},{"title":144,"path":145},{"title":147,"path":148},{"title":150,"path":151},{"title":153,"path":154},{"name":156,"items":1558},[1559,1560,1561,1562],{"title":159,"path":160},{"title":162,"path":163},{"title":165,"path":166},{"title":168,"path":169},{"name":171,"items":1564},[1565,1566,1567,1568,1569,1570,1571],{"title":174,"path":175},{"title":177,"path":178},{"title":180,"path":181},{"title":183,"path":184},{"title":186,"path":187},{"title":189,"path":190},{"title":192,"path":193},{},1780318592948]