I am trying to escaladate a problem with Octopress.
By analysing my blog with a SEO tool, I note that a "/" is missing (between blog and categories):
http://www.myblog.com/blogcategories/linux
I also note that, in the octopress/public/categories folder, for each category of my blog, one folder is created with one index.html file, i.e:
octopress/public/categories/linux/index.html
On the 22rd line, I see:
<link rel="canonical" href="http://myblog.com/blogcategories/linux">
which is the source of my problem.
I would like to know which module in Octopress generates this file and what could be my mistake ?
I declared in _config.yml the following parameter:
category_dir: categories
I'm not sure if this completely solves your problem, but I found this site with lots of octopress hacks. There is a section about categories in the sidebar: http://www.narga.net/improve-octopress-advanced-tweaks-tips/
Sidebar category list
This plugin provides the category list and post count shown in the sidebar.
Save tag_cloud.rb to plugins/tag_cloud.rb.
Save category_list.html to source/_includes/custom/asides/category_list.html.
Append to default_asides in _config.yml:
Add to _config.yml: default_asides: [asides/recent_posts.html, asides/github.html, asides/twitter.html, asides/delicious.html, asides/pinboard.html, asides/googleplus.html, custom/asides/category_list.html]
Related
I have a Script . there have a footer text after
</body></html>
that means end of every page .i searching all view file and some off others directories not find out that text . so is there any possibility File i can get this footer text. i have not enough knowledge in laravel ..
As you mecioned, you cant find text on your footer.
That is probably beacause you have a template for content
search line code
section('content')
or maybe
section('footer')
This is the section you are working on.
Go back to your views folder
Open app.blade.php, find yield('content') or what your looking for, there you have the code included into all views.
or maybe you have a view fooder.blade.php the footer of all views
That is templating logic on laravel, you can search all code following the sections.
If there is no a layouts folder, look for something with related name.
the problem:
we are porting a wordpress blog to lektor. The slugs in wordpress of the post are directly under the main domain e.g. www.mypage.com/my-blogpost-about-food/ not www.mypage.com/blog/my-blogpost-about-food/.
Now the owner is not ready to accept any broken links. Broken links from the outside, e.g. some random internet page links to www.mypage.com/my-blogpost-about-food/. This link will not work in lektor. This will decrease the page rank of the redesign of the page with lektor. What can I do to avoid this?
Again, in our current wordpress website
the main blog page sits under:
www.mypage.com/blog/
each blog post has a unique slug, NOT under /blog/ but directly in the main.
e.g.
www.mypage.com/my-blogpost-about-food/
What can I do, to make these URLs be valid for lektor as well? that e.g. mypage.com/my-blogpost-about-food is a blog post.
EDIT: this is what lektor does not support. Blog posts in lektor must sit in www.mypage.com/blog/SINGLE-BLOG-POSTS-MUSTBEHERE but I want the blog posts to be here www.mypage.com/SINGLE-BLOG-POSTS-MUSTBEHERE
reading here
https://www.getlektor.com/docs/content/urls/
if I go to the system fields and enter my-blogpost-about-food it will still appear in /blog/my-blogpost-about-food/
reading here it becomes clear that I cannot change the slug in the parent model neither:
With the above settings the blog will live at blog/ and the posts at
blog/. But what if you want to put the date of the blog
post into the URL? That's thankfully very easy. All you need to do is
to set up a new URL format for the children. Just edit blog.ini and
add this to the [children] section:
slug_format = {{ (this.pub_date|dateformat('YYYY/M/') if this.pub_date) ~ this._id }}
What this does is that it will prepend the year (YYYY) and month (M)
to the ID of the page if the publication date is configured. Otherwise
it will just use the ID of the page. With this change our blog post
will move from for instance blog/hello/ to blog/2015/12/hello/.
now how would I achieve a behaviour similar to this?
this is the formal of the perma links of our wordpress installation:
This is possible. If you started with the default setup from lektor quickstart:
In models/blog-post.ini, remove hidden = yes
In models/blog.ini, under the pagination section, add items = site.query('/').filter(F._model == 'blog-post')
The first step lets you create blog posts under root in the admin.
The second step tells the page blog to look for its pagination items under /, and only include the ones of type blog-post. This will exclude e.g. About, Blog, etc.
You will now have your site's home page at /, a blog page with list of all posts at /blog, and each post will be located at example.com/my-blogpost-about-food/.
To create a new blog post in the admin, go to the root admin page (not the /blog admin page), click the +, and select Blog Post for your new page type. It will show up in the list on /blog, and live directly under /.
I'm not certain I understand exactly what you want to achieve. If I understand correctly you can possibly solve this using the replaced_with for children functionality:
https://www.getlektor.com/docs/guides/categories/
On all my Joomla pages I have the articles title as the h1 tag, so until now, Joomla has always displayed the title, i.e. what you see on the browser tab as the h1 tag. (There were one and the same thing).
However, this is not the case with all the pages that have no menu item linking to them, (they are linked to the rest of the site through another article). Here the name of my site is the page title.
How do I make the h1 tag the page title on these pages?
Try this,
This is happen due to those article pages meta options have title, Meta tag and keywords those are blank or not set yet. Then this case Joomla will read those info from your Global settings It may have your site name and Global description.
So the solution is set the Proper meta info for those articles from article manager.
If it is not practical then you can try it from article view or layout page Set meta data of Joomla page
Second Method is for setting the page title forcefully from scripts. It used for any components like here you have to check first method it will work for you..
Hope its Helps..
Problem solved! Here is how:
Make an override of com_content article and edit the default.php. Around lines 42/43 you should have the following code (the line number may not be exact as I have already taken out some code for a previous override):
<?php if ($params->get('show_title') || $params->get('show_author')) : ?>
Straight after that, add the following lines of code:
<?php $document=& JFactory::getDocument();
$document->setTitle( $this->item->title ); ?>
I'm generating html documentation in Sphinx.
How do I modify the sidebar for each of the html pages in my document so that they include the toctree? By default the toctree only seems to display in the master_doc page, and only in the main area instead of the sidebar.
Is there an easy way to do this? I'll be using readthedocs to host the generated documentation, so I would prefer to avoid the use of any third-party plugins, unless they are also available on readthedocs.
You can customize your html sidebar in conf.py.
The default html sidebar consists of 4 templates:
['localtoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html']
In conf.py you could change localtoc.html to globaltoc.html like this:
html_sidebars = { '**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html'] }
Since this in the end this will be used in HTML files, this should work on ReadTheDocs.
Including the 'globaltoc.html' has a drawback in that it doesn't show both the global and local toc for the page you're viewing.
It appears that others were irked about this limitation and resulted in the subsequent development of an extension to support a full toc in the sidebar, checkout: https://pypi.python.org/pypi/sphinxcontrib-fulltoc
Nothing will appear in the "Navigation" section of the default Sphinx sidebar until you add the names of files that you want to scan for section headings to the toctree:: directive in your .rst file.
For example, if you want all the headings of your index.rst file to appear in the Navigation pane, write index (without the extension) in the toctree:: list like so:
My Level 1 Heading
==================
Glorious content.
My Level 2 Heading
------------------
More content
.. toctree::
:maxdepth: 2
:caption: Contents:
index
The crucial bit is adding index right there at the end. If you're like me, you start your projects with the auto-generated template from sphinx-quickstart, which (at time of writing) populates your .rst files with EMPTY toctrees.
I've inherited a Magento shop site, and the previous developer has gone AWOL. So I'm left with a sheet of paper essentially telling me how to do basic things such as changing the banner on the home page. That's pretty much it.
The person who owns the page now wants to change an advert that's held on the right hand side on the product pages. I've searched in the Admin panel under CMS and drawn a blank. I've navigated through the template files and I've found the 3 column HTML file that I thought contains the actual advert.
It doesn't. Instead, it has the following code:
<div class="col-right sidebar"><?php echo $this->getChildHtml('right') ?></div>
Where can I find the Child HTML? I've searched all of the folders for the file that I'm assuming is called "Right". But I can't seem to find it.
Anyone know where something like this could or would be held?
That is the absolute most root function, anything that is placed in the child "right" will be displayed here and is most certainly not where you want to be doing your editing.
There are literally a hundred different ways content could be posted here and what I would recommend to start with is first determining if it is a static block or a template file.
Go to System -> Configuration -> Developer.
Change "Current Configuration Scope:" to the store you are currently troubleshooting.
Find your IP and place it in "Allowed IPs (comma separated)", this way the next steps will only be visible to you.
Under the "Debug" section you should now see "Template Path Hints" enable this and reload the page.
If that block now has something like: "app/design/base/default/catalog/product/view.phtml" you know it is in a phtml file and you can go there. If it doesn't:
It could be a banner, go to CMS -> Banners and check there.
It could be a static block, go to CMS -> Static Blocks
It could be...any number of things.
You stated that it is on the product page, next step is check catalog.xml in your layout folders. Search for and see if anything inside of there makes sense about what it could be. If the previous developer was any kind of proficient it won't be in catalog.xml but in local.xml OR a custom module's .xml file in the layout directory of the custom theme.
Try doing a search on the code base for the content inside of the block and see if anything pops up. If nothing, use phpmyadmin to search the database for some of the content.
Hope this helps a little.
Search for:
<reference name="right">