UNPKG

ultimate-jekyll-manager

Version:
105 lines (103 loc) 4.03 kB
{\rtf1\ansi\ansicpg1252\cocoartf2822 \cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 Menlo-Regular;\f1\fnil\fcharset0 .AppleSystemUIFontMonospaced-Regular;} {\colortbl;\red255\green255\blue255;\red0\green0\blue0;\red155\green162\blue177;\red197\green136\blue83; \red136\green185\blue102;} {\*\expandedcolortbl;;\csgray\c0;\cssrgb\c67059\c69804\c74902;\cssrgb\c81961\c60392\c40000; \cssrgb\c59608\c76471\c47451;} \margl1440\margr1440\vieww23520\viewh15940\viewkind0 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 \f0\fs22 \cf2 \CocoaLigature0 I want to build a jekyll template called ultimate jekyll and i need your help putting it together.\ \ to start things off, i want to have a theme system. in _config.yml, we specify the theme like \ \ theme:\ id: 'front'\ mode: 'frontend'\ \ the theme is a bootstrap theme. the theme comes with a frontend for users and an backend admin portal.\ \ next some pages will use "placeholders". for example i might make a file called pages/terms.html that just looks like this\ ---\ layout: placeholders/terms\ ---\ \ That way, every new website i set up has a terms and conditions thats preset in _layouts/placeholders/terms.html. however, this is where things get tricky. \ \ here is _layouts/placeholders/terms.html\ ---\ layout: themes/[ site.theme.id ]/frontend/default\ ---\ This is where the TOS text will be\ \ notice the dynamic site.theme.id. i already have gulp set up to automatically replace that part. i dont need you to work on that part. just assume it works already\ \ themes/front/frontend/default.html looks like this\ ---\ layout: main/base.html\ ---\ \{% include project/header.html %\}\ \{\{ content\}\}\ \{% include project/footer.html %\}\ \ main/base.html looks like this\ ---\ layout: null\ ---\ // HEAD TAG with a bunch of important meta tags\ <body>\ \{\{ content \}\}\ \ </body>\ \ \ so you can see how there are many nested templates to deal with. a lot of it is meant to keep me from writing repetitive code in new projects. i am struggling wiht how to deal with project/header.html. i dont want to actually use html in this file, preferably JSON so i can do quick things like \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 \f1\fs26 \cf3 \CocoaLigature1 \{\ \cf4 "logo"\cf3 : \{\ \cf4 "src"\cf3 : \cf5 "/assets/logo.svg"\cf3 ,\ \cf4 "alt"\cf3 : \cf5 "MyWebsite Logo"\cf3 ,\ \cf4 "href"\cf3 : \cf5 "/"\cf3 \ \},\ \cf4 "links"\cf3 : [\ \{\ \cf4 "label"\cf3 : \cf5 "Home"\cf3 ,\ \cf4 "href"\cf3 : \cf5 "/"\cf3 \ \},\ \{\ \cf4 "label"\cf3 : \cf5 "Services"\cf3 ,\ \cf4 "href"\cf3 : \cf5 "/services"\cf3 ,\ \cf4 "children"\cf3 : [\ \{\ \cf4 "label"\cf3 : \cf5 "Web Development"\cf3 ,\ \cf4 "href"\cf3 : \cf5 "/services/web-development"\cf3 \ \},\ \{\ \cf4 "label"\cf3 : \cf5 "Marketing"\cf3 ,\ \cf4 "href"\cf3 : \cf5 "/services/marketing"\cf3 ,\ \cf4 "children"\cf3 : [\ \{\ \cf4 "label"\cf3 : \cf5 "SEO"\cf3 ,\ \cf4 "href"\cf3 : \cf5 "/services/marketing/seo"\cf3 \ \},\ ]\ \}\ ]\ \},\ \{\ \cf4 "label"\cf3 : \cf5 "Blog"\cf3 ,\ \cf4 "href"\cf3 : \cf5 "/blog"\cf3 \ \},\ \{\ \cf4 "label"\cf3 : \cf5 "Contact"\cf3 ,\ \cf4 "href"\cf3 : \cf5 "/contact"\cf3 \ \}\ ],\ \cf4 "cta"\cf3 : \{\ \cf4 "label"\cf3 : \cf5 "Sign Up"\cf3 ,\ \cf4 "href"\cf3 : \cf5 "/signup"\cf3 \ \}\ \} \f0\fs22 \cf2 \CocoaLigature0 \ \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 \ and have it constructed using a theme file (maybe _layouts/themes/front/templates/header.html?) and then eventually it will actually become project/header.html so jekyll can obviosuly include it in the build.}