jekyll directory structure / changing index.html to different page -


i'm new jekyll , having trouble setting way want. have site standard directory structure: css, img , js directories , and index , page html files on same level. far normal.

if run jekyll new blog, sets files needs in subdir blog. when go directory change basic layout files , jekyll serve, builds fine, can't find css files valid whole site - because can't "see" in directory further up. i've tried messing path css, don't seem able make show up. tried moving subdir "blog" 1 level, _layoutsb folder etc on same level css , img directories, have problem jekyll builds "index.html" file - don't want that, have index file, , it's .php, not .html.

how can either: a.) jekyll running in subdir use css styles, images etc main css dir

or

b.) jekyll live on top level dir build not "index.html"??

thanks help. keep building, deleting , tweaking , making no progress @ all.

well, jekyll static website generator , not support php. can liquid templating language, includes , can use tons of functions, filters , other features allow write dynamically , publish static pages.

good news, though: i've found workaround include php files! ;)

  1. create folder in site root. let's it's name php (without underscore). add there many php files want. let's assume have included index.php inside php dir.

  2. in _config.yml, add line:

    keep_files: [php] 

this let folder php untouched when jekyll build site.

  1. run jekyll serve would.

  2. when add link stylesheets (and other links), don't forget folder containing php files @ same level css folder, in index.php:

    <link rel="stylesheet" href="../css/main.css"> 
  3. to see php files taking effect, you'll need build site in localhost root. example, if use xampp, inside of htdocs. see files, you'll need turn apacheon , type in browser: http://localhost/test/_site/php/ - test project root folder - , you'll see index.php working should. other files available via _site , via localhost:4000.

  4. upload web server _site content only, unless server builds jekyll automatically.

open _site folder check how website build.

don't forget: you won't allowed host site on github pages it's doesn't offer support php. i'd recommend host site in full-featured hosting provider.

hope have helped!


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -