In the Jekyll config, source is set to source: ./jekyll
A collection that lives in that source ./jekyll/_work
Netlify CMS Config inside admin folder ./jekyll/admin/config.yml
The path to the folder where the documents are stored
Collection path references from the admin config folder: "_work"
The admin CMS actually creates this folder in the root of the repo with the html file inside of it
[Question] The path to the folder where the documents are stored
Does the admin config path have to include the Jekyll source again e.g. folder: "../jekyll/_work"
The folder paths in the Netlify CMS config.yml are relative to the root of your repository.
In this case:
folder: "jekyll/_work"
Notes:
media_folder is also relative to the root of the repository
Do NOT prefix your paths with location starts (ie "./" or "/")
Related
Im trying to host a github live server for a project that right now has a "index.html" main folder with 4 files inside that main folder named "forgot-pass.html" "home.html" "sign-in.html" "sign-up.html"
I know to host on github your html needs to be a index.html but my question is can you have a folder named index.html with html files inside that folder and it still work? or how can i host on github if i have multiple html files named various things.
Yes you can have more html files in the same folder or subfolders, but it's mandatory to have the "index.html" file. Also I think you can make that folder but will not work (I don't know if it works or not, but give it a shot).
Its required to have a "index.html" file located in the root directory. As far as having a main FOLDER named index.html with files inside of that as-well, did not work for me. but i did not try to have a index.html file in the root directory on its own ALONG with a separate folder containing the rest of the html files. So i don't know if that works or not. i just put all the html files in the root directory and made sure to have one named "index.html"
While learning about paths I found out that "/" takes you to the root directory. I made .html and .css files in the same directory to test how it behaves for different paths. When linking the css file, href = "app.css" and href = "./app.css" both work fine but when I try href = "/app.css" it doesn't link. I know "/" is suposed to take you to the root directory and from what I understand the directory of the html file is the root directory. So why isn't the css file linking properly?
/ means the root of the current drive
./ means the current directory
../ means the parent of the current directory
No need to add the "/" or "./" because your app.css file is in your current directory.
In Netlify to redirect a default Netlify subdomain to a primary domain I need to add a _redirects file to the root of my _site folder.
In the root of my Jekyll project I've added a file named _redirects (no extension), but when my _site is generated it ignored the file and nothing is created, no file, no folder and page. How do I move a file with no extension into my _site directory?
I've added numerous static files with extensions without an issue, but I'm not sure how to accomplish this one.
From Netlify redirects documentation :
... (For Jekyll, this requires adding an include parameter to _config.yml.)
include:
- ...
- _redirects
I am using Yeoman to create a static website, which created a file structure like:
-app
index.html
-css
style.css
-js
script.js
Gruntfile.js
README.md
bower.json
package.json
I used filezilla to send this to my server (using bluehost) but nothing seems to be displaying? when I try to hit the website. (ex. whatever.com)
Is it because my 'index.html' lives inside the app directory? Should I only host my app diretory so 'index.html' is in the root directory?
I think you are on the right track with location of index.html but not quite. Your file structure should look like:
[document root]
index.html
- css (a directory of the root)
style.css
- js (also a directory of the root same as css)
script.js
Gruntfile.js
README.md
bower.json
package.json
Note in the above structure, there is no -app folder. You can test the above by using your web browser and pointing to http://yoursite.domain/app and see if that displays.
If that does not solve the issue, then you may be uploading to somewhere outside of the document root for your web server in which case you should find out where that is. Best place to ask about that would be on either https://serverfault.com/ or on https://superuser.com/. Good luck.
Using Jekyll 2.5.3 I have a collection "_assets" where I would like to store things like:
.htaccess
favicon.ico
apple-touch-icon-*.png
I am using this in _config.yml:
collections:
assets:
output: true
permalink: "/:path.html"
And the intention is to have these items published to the root directory. However, they are actually being published to a "/assets/" directory.
How can I correct this configuration to output to the intended root directory?