Adding _includes and _layouts files to Jekyll directory - ruby

I'm new to Ruby and Jekyll, and I've been following this tutorial on how to create a static-site. I've reached the part where we're supposed to edit files inside the _includes and _layouts folders, but those folders don't appear in my directory. There is however a _site folder with an index.html file inside it, and it looks like that's what's showing when I run the website with 'jekyll serve'. Am I supposed to add these folders and files in myself, or should I edit _site/about/index.html to match what the tutorial has?
Here's a picture of what my current folder structure looks like:

Yes, you should add those folders and files yourself. Copy them from the theme repo and skip anyone you don't want to customize / override. The default theme config created by command jekyll new is https://github.com/jekyll/minima
The _site folder is being generated on the fly, it reflects the result of the customization.

Related

How to get source-mapped folders and files. There are no bundler/compiler retains source maps

The previous quitter couldn't contact anyone and made the file like that.
There are no original files in directories.
So, anyway no one answered my past same questions. /
I have only source files that are no Scss and no bundler. /
I couldn't upload that files via Github .. sorry
I think... this project was using 'webpack'. And that project used 'inline' as the 'source map' option.
there are scss files in Chrome browser /
there are no files in that directories

DBT docs generate - How to give the specific branding to the documentation website

How to replace the DBT logo with some other image in the website header, generated by dbt docs generate command.
The documentation consists of an index.html file, which loads data from the artifact files (source).
If you edit the index.html file you will be able to customise it as you wish. Note that each time you run dbt docs generate the file will be re-copied into your target folder, so you’ll need some mechanism for either copying the artifacts to wherever your new index.html` is located or overwriting the file with your customised version.
If you change the file in the source folder, I believe the index.html file is copied from the dbt installation folder to the target folder everytime you run dbt docs generate. You can customize the index.html file from that directory and then you don't have to worry about making any changes when you run dbt docs generate.
This is what I'd do:
Find index.html file in the dbt installation directory add the line
<link rel='stylesheet' href='/styles.css' />
in the <head> tag. This way, you only have to make this change again when you update dbt
Add a styles.css file in your target folder and then target the class of the dbt logo. If you change the background color of the logo, you should be fine and you will not have to re-copy every time you run dbt docs generate.
.logo {
background-image: url(<<path or url to your image>>);
background-color: transparent;
}
You can adjust other properties like background-repeat, background-position, background-size, background-color according to your preferences.
Wanted to expand on #Kay answer a bit as it helped me tremendously.
To find the dbt installation folder on Windows, you need to go into your venv folder within your project and navigate down to the dbt/include folder. This may be different for different projects/OS, so here is my path to help shed light on where this may be:
venv --> Lib --> site_packages --> dbt --> include --> index.html
Once you have located the file, follow the steps in #Kay answer. The only modification that I made is to add in a corresponding file path in the HTML added to the index.html file
<link rel='stylesheet' href='**..dbt_project_path**/styles.css' />
Next, in your dbt project, go and add that specific folder to your root dbt project directory. From there, add in your .css file. By aligning the index.html file path to the file path created in your dbt project, you will always reference the .css (or any other modifications you have) when running the dbt docs generate command.

serve_site() in blogdown un-deletes old files

I built a site using blogdown in Rstudio. I'm not sure if I am experiencing a bug or if this is expected, but it is kind of annoying, and I'm wondering if I can fix it.
When I use
serve_site()
All of the old file folders I deleted come back in my public folder.
My current set up is with the Lithium theme, and I make several test documents and folders to test the linking. When I make .Rmd files in the content folder in particular, it will create a folder with that name in the Public folder as well as that name_files.
After I delete the test folders and test file folders, the test file folders come back after I use the serve_site() function in Rstudio.
Example:
1) Add "Example.Rmd" to the content folder
2) Automatically an "Example" folder is added to the Public folder with the index.html
3) Automatically an "Example_files" folder is added to the Public folder with the related files
4) After testing I delete the Example.Rmd, Example Folder from the public folder, Example_files folder from Public
5) After using serve_site() in Rstudio, the "Example_files" folder comes back - I cannot delete it!
Thanks again
Look for *_files directories under the static/ directory (under your website's root directory) and delete them there.

Gather contents of src 'files' folder into versioned folder in the out directory

I would like to take all the contents of my 'files' folder, that's in my 'src' folder (js, css, image files etc), and add them to a folder in the out directory called, say, v001.
I could then version all my static assets on my Amazon S3 storage and only invalidate my html files when there are new changes (and archive the previous version of assets to save some space). I'd obviously add some management to the html document templates to pick the correct version of the assets.
Here's my src directory structure:
-src
-files
-fonts
-img
-scripts
-styles
-documents
index.html.eco
-layouts
default.html.eco
And I want my out folder to look like this
-out
-v001
-fonts
-img
-scripts
-styles
index.html
I'm not sure how to gather the contents of my src 'files' folder and put them in the out directory in a folder called v001. Could anyone help please?
I would integrate grunt or gulp for such solution.
You could either use docpad plugins for grunt or gulp, or tools themselves.
For example there is a grunt plugin for copying files and folders: https://github.com/gruntjs/grunt-contrib-copy
I'm curious how would you do the invalidation
=====
Update. So what I just did and recommend to you.
Install gulp in your docpad project: https://github.com/gulpjs/gulp/
Install gulp docpad plugin: https://github.com/terminalpixel/docpad-plugin-gulp
then install proper gulp plugin that will help you to copy files to a proper new folder.
As you can see from gulp docpad configuration, you can add this copy/paste action to the whole docpad build process - super awesome

JInstaller::install: File '...' does not exist

My installer has been working until a few days ago, now I get:
JInstaller::install: File '/home/john/public_html/tmp/install_4c578c96e449f/com_mycomponent/admin/site/controllers' does not exist.
I checked the zip file and everything looks ok, I changed file contents but not the file structure at all since the time it was working.
ZIP STRUCTURE
com_mycomponent.xml
admin
controllers
...rest of admin files
site
controllers
...rest of site files
In fact the folder
com_mycomponent/admin/site/controllers does in face not exist, I don't know why it is looking for this folder.
Please check your templateDetails.xml file. It must have mentioned about the folder name. Also, make sure if you want to add folder through template then that folder must not be empty
I had the trouble that I had accidentally put a copy of the xml file inside the admin/ folder in addition to in the root folder. Maybe this happened to you too? Just delete it and it works fine!
If you have any backup files on the components folder or some where in the project folder delete it or cut it to some where else...
May be that solves your problem.
Because that solves for me.
thanks
I had the same problem. One of the file names, in templateDetails.xml had a typo. That solved my issue.
For some reason it did not like my HTML file, so I deleted it from the XML. When I checked the module installed and the HTML file was present. I still included <folder>html</folder and also <filename>index.html</filename>

Resources