I started to make my blog with jekyll and github pages.
I was doing fine with the basic theme,
But I wanted to apply the side bar property,
so I downloaded the theme which has the sidebar, from https://idratherbewriting.com/documentation-theme-jekyll/
So I downloaded the proejct and overrided.
I don't know much about how this works,
but the strangest thing is that
in index.md file
if I put
---
layout:home
sidebar:mydoc_sidebar
----
it happens to show the basic theme layout
and the posts as it should be, but if I change the layout to
something else which is inside the _layout folder such as post, default,
the posts disappear and I have no idea why Jekyll does this.
Even when I erase the layout, it returns empty screen
so I'm sure it's doing something with the
home layout but I couldn't find anywhere how the home layout is rendered.
In _config.yml, we can see that you are using (theme: minima) the minima gem based theme (documentation). That means that by default, all your _includes, _layouts and assets are hidden somewhere on you computer. You can use the bundle show minima command to find out where they are stored.
As home layout exists in minima theme, is it used.
If you want to use your own home layout you can copy it from minima to your _layouts folder and modify it to suits your needs.
cd your/root
cp `echo "$(bundle show minima)/_layouts/home.html" _layouts/home.html`
If you want to be sure not to use hidden resources, you can delete the theme: minima directive from your _config.yml file.
this issue can be caused by several factors but it is possible there's no issue at all :)
1) Stop Jekyll serve/watch.
2) Delete the _site directory.
3) Rebuild and serve the site
jekyll serve.
Keep an eye on the terminal to see if Jekyll warns you about the missing layout file.
It is possible, albeit unlikely that the theme or a plugin id building layouts on the fly. To override this (whether it is the case or not), create a home layout as usual and include in a page/post's front-matter. Just keep the layout basic with something like a red background so that you can easily test if it is loaded or not.
I think deleting the _site folder will fix this but if not, try the other option and let me know.
Related
I'm using the Hugo Whiteplain theme for a personal site hosted through Netlify. I am following tutorial. When I push/publish on GitHub Desktop, I am told that my git submodule is dirty. As a result, I cannot change the theme's background color.
[submodule "themes/whiteplain"]
path = themes/whiteplain
url = https://github.com/taikii/whiteplain.git
What do I do to regain control of my theme? Can I change the color without dependence on this dirty submodule?
There are many ways to customize a Hugo theme. For instance, you can:
edit the theme directly and let it drift from the original project,
create a fork and use it as the theme to be able to pull updates
from the original theme while developing your own version,
edit the theme inside the website itself.
This last option means that you do not touch at the theme itself, but instead make a copy of any file you want to edit inside the tree of your website, following the same path structure, and edit that file.
For any element of any of the customization files (layout, css, scss, etc.) that exists both under the tree of your website and under the tree of the theme, Hugo will prioritize the element in the file under the tree of the website.
For any element not present in the tree of your site, Hugo will use what is in the theme tree instead. This means that you do not have to copy the entire theme or even entire files in your site, but only the elements that you want to customize.
If you choose this method and if you set your theme as a submodule following the Git submodule manual, you will never get into a dirty submodule situation.
Example
Let's say you want to edit the background color of your theme and that the variable is defined in a scss file under:
your_site
+ themes
+ theme_name
+ assets
+ scss
_content.scss
You need to keep the tree architecture and create a file under:
your_site
+ assets
+ scss
_content.scss
You can create a file from scratch, but an easier option is to copy the file from the theme and paste it there. In that file, you can customize the background color (or any other setting) however you like.
Note
I have found this way of customizing a theme (which is actually the way advised in the Hugo documentation) to be the simplest.
One situation where this method is not optimal is if you plan to use the same customized version of a theme for several websites. In that case, creating a fork of the original theme makes more sense as you can add your customized theme (your fork) as a submodule of all those websites and your customization is thus portable.
I am trying to follow the Jekyll docs and am stuck on how to display an image
---
layout: post
title: "My first post!"
date: 2016-10-20 16:17:57 +0200
categories: jekyll update
regenerate: true
---
This is in the `_posts` directory.
It can be edited then rebuild the site to see the changes.
You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
![name of the image][{{site.url}}/assets/P6740674.JPG]
I feel very silly asking this question as it is so basic but I can not find any answers to my question
Is it possibly a configuration error on my own system. I am using apache2, ruby gems, etc
Thanks in advance
If you want to use site.url, you have to add a url variable to your _config.yml file. More info in the Jekyll documentation.
But you might not have to use site.url at all. Any urls that start with a / slash will be relative to the top level of your domain. So you could do this:
![image tooltip here](/assets/image.jpg)
I could see an images directory created under assets by default. I've placed an image as follows.
assets/images/myimage.jpg and add following line in the post.
![My image Name](/assets/images/myimage.jpg)
Run bundle exec jekyll serve and see if there is any error. If you have mentioned mismatching file location, you will see error here.
The problem here is annoying simple - you have the wrong format for your image link.
It should be ![name](link). You have ![name][link]. Note the difference in the brackets. Everything else is fine.
I know this is an old question but I spent some 15min on this (jekyll/github blog is my secondary blog). So adding a suggestion here.
Briefly, as Kevin suggested, add the image file to a path under the root and give path to that file. Make sure that the file/directory is being tracked; not .gitignored.
My assets directory is inside _site directory. But, when I added a new image under that path git status did not show it as newly added- .gitignore ignored the _site directory. So Kevin's suggestion did not work as is. But as per his suggestion, I reasoned that as docs is my site's root, if I add an images directory there and add the image under that then something like
![image description](/images/my_image.png)
should work. And it worked this way. Not sure if this is the best way. Sharing here in case you have similar config.
In my case, I forgot to push the image to remote and therefore the image didn't show. Just to keep this in mind as well.
I'm fairly new to Magento and am having trouble uploading the Aheadworks blog extension to the correct directories. I am using a custom theme for my site, let's call it "themex". The directions state "Navigate inside step_1 directory. If you use a different from default theme - be sure to rename step_1/app/design/frontend/default/default and step_1/skin/frontend/default/default folders to your store's values."
I've located the 'step_1' directory but I'm not quite understanding the latter part of the directions. Am I renaming the 'step_1' directory to "themex" and uploading it to the root directory? Please be as descriptive as possible in your response.
Their instructions are badly phrased, but I'm pretty sure it means that you need to upload the files to app/design/frontend/default/themex
Magento theme files appear in the app/design/frontend/ folder.
The "base" folder here contains the core layout files, and the "default" folder contains the file overrides for other themes. As such, your theme's layout files will appear under app/design/frontend/default/themex (possibly app/design/frontend/themex/default depending on how the theme works)
Magento will first look for design files here first, and then look under app/design/frontend/base if the override does not exist.
Make sure you back-up any files, and if their files over-write any of your theme files then run a comparison on them to make sure they are not over-writing any of your theme's functionality.
I want to create a theme, using a default WordPress theme as the initial point.
According to WordPress Codex, the recommended way to do that is to create a child theme.
Unfortunately, that approach may noticeably affect the performance of a site, because both themes have to be called before the site is actually displayed. WordPress tends to be fairly slow on quite a number of popular hosts, so slowing it down even further is not something I would want to do.
At the same time, coding a theme from scratch seems to be inefficient when an open source theme is close enough to the desired result to only require certain minor recoding.
Question: if I rename the theme in the main CSS file, there's still a lot of function callbacks and variables addressing the name of the old theme (for example, 'twentyeleven'). There has to be some central location where these are called from. What things do I need to rename, in addition to the theme name at the top of CSS file, to fully rename the entire theme an prevent it from being updated, should the original theme be updated by WordPress development theme?
All functions and callbacks of a theme are only being used if the theme is activated. So if you copy the 'twentyeleven' theme into a new folder & activate it, only those functions are loaded even if they have the same name(s) as the original theme. To answer your question (going with the 'twentyeleven' theme):
Copy the 'twentyeleven' theme folder and give it a unique name
Edit the file style.css in your freshly copied theme folder. Change the Theme Name:, Theme URI:, Theme Author:, Description: & Version: values to match your desired output.
Go to Appearance->Themes and activate your new theme
You have now a 'twentyeleven' clone, but completely independent of the original files. Any updates available for the 'twentyeleven' theme will not affect your theme (there will be no updates listed for your theme).
HTH
you may be interested in html5blank, a boilerplate wordpress theme
This is my first time working with Magento and here is what happend: I spent two days reading the documentation and tweaking the settings to fit my needs. I then installed this theme:
http://themeforest.net/item/decostore-magento-theme/1876494?WT.ac=category_thumb&WT.seg_1=category_thumb&WT.z_author=8theme
The problem is that the theme didn't work the way I was expecting and now I'd like to rollback to the default theme and completely remove everything added by this theme to my installation.
Unfortunately, I didn't backup the installation and database before I installed the new theme and I have no idea where to start.
Thanks in advance.
1. Switching back to default theme
Go to the admin area and then system > configuration > design
Change "Current Package Name" to 'default' and make sure all inputs under the "Themes" section are empty. This will return you to the default theme.
2. Completely remove everything added by this theme
I take it from your question that you are not using any form of source control. Might be an idea to look into this for the future :)
Magento 1.7 has introduced backup and rollback features so you may also want to check that out.
If this is the case, backup everything before you start removing files and directories as described below
Anyway, to completely remove all files and directories added when you installed the module, unfortunately it will simply be a case of manually finding the files and directories deleting.
The easiest way to do this will be to find the original source code you received when you purchased the theme and removing the corresponding files from your site. When removing directories be careful to only remove those specific to the theme - It will have been sent to you structured so that you can easily drag straight in to your web root - so will contain some other directories required by Magento, simply to give it the correct hierarchy.
At the very least there will be files and folders specific to the theme located in the following directories:
app/design/frontend
skin/frontend
js
and also most likely some more in the following:
app/etc/modules
app/design/adminhtml
app/locale
I know the result for this can be different for everyone, but in case someone else comes across my specific case, it was the N98 folder under app/code/community/N98 that caused the problem. Particularly their CustomerGroupCheckout plugin as shown here: https://github.com/amenk/N98_CustomerGroupCheckout
Removing the N98 folder brought back the configuration page.