I am new to github pages and am currently trying to build a blog for my Design Studies but can't seem to get my post to output to the correct pages.
Currently all posts are being posted on the home page but need to be displayed on their appropriate course pages.
https://angusharrison.github.io/Design/
https://github.com/AngusHarrison/Design
Here is my sidebar menu
<menu class="sidebar-menu">
<li class="menu-items"><a class="menu-links" href="{{site.baseurl}}/">Home</a></li>
<li class="menu-items"><a class="menu-links" href="{{site.baseurl}}/about/">About</a></li>
<li class="menu-items"><a class="menu-links" href="{{site.baseurl}}/INDN211/">INDN211</a></li>
<li class="menu-items"><a class="menu-links" href="{{site.baseurl}}/INDN241/">INDN241</a></li>
<li class="menu-items"><a class="menu-links" href="{{site.baseurl}}/INDN341/">INDN341</a></li>
</menu>
When creating a post i would like to be able to output the post to the desired Page e.g https://angusharrison.github.io/Design/INDN211/
Any help is greatly appreciated
I have checked your Github repository, and here are the results:
Instead of single fixed links you currently have in your sidebar.html like
<li class="menu-items"><a class="menu-links" href="{{site.baseurl}}/INDN211/">INDN211</a></li>
use this in your sidebar:
{% for post in site.posts %}
<li class="menu-items">
<a class="menu-links" href="{{ post.url }}">{{ post.title }}</a>
</li>
{% endfor %}
This loops over your posts in the root of your _posts folder and it is using the title from the front matter of each post. You could easily add something like linktext: anyvalue to the front matter of each post and use post.linktext instead of post.title in the loop as link name.
The post files should be named like 2020-02-02-anynameyoulike.md, remove the seconds(?) from your filenames. And, there should be no subfolders.
Additionally I removed this from your _config.yml, as your question is around posts, not collections, it seems that you don't need that:
permalink: ':title/'
collections:
INDN211
INDN241
INDN341
Optional, but I recommend to remove any collection: anyvalue and permalink: anyvalue from the frontmatter of your posts. You don't need them.
Result:
I recommend to read this page about posts https://jekyllrb.com/docs/posts/
as well as the rest of the Jekyll documentation :)
Related
Spending a lot of time one figuring out that how to embed facebook posts along with comments, I came up with the idea to embed posts and comment separately using plugins and iterate over comments.
Post:
{% for post in pids %}
<div class="fb-post" data-href="https://www.facebook.com/rio2016/posts/{{ post }}" data-width="750"></div>
<div class="fb-comment-embed" data-href="https://www.facebook.com/zuck/posts/10102735452532991?comment_id=1070233703036185" data-width="750"></div>
<div class="fb-comments" data-href="https://developers.facebook.com/docs/plugins/comments" data-width="750" data-numposts="2"></div>
{% endfor %}
But it differs a lot in design than a post on facebook.
Looks like below:
Screenshot of post
Is there any other way which can facilitate to embed an arbitrary public post along with associated comments?
I'm having trouble with WWW::Selenium finding an href.
Here is the HTML element I'm looking for.
Sell Products
Here is the Perl code I'm using.
$sel->click('//a[contains(#href, "/auctions?organization_id=2")]');
Here is the error that WWW::Selenium is outputting.
Error requesting http://localhost:4444/selenium-server/driver/:
ERROR: Element //a[contains(#href, "/auctions?organization_id=2")] not found
Any tips/help will be greatly appreciated.
EDIT
Adding the surrounding HTML to aid in the troubleshooting.
<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children">
Sell Products
</li>
</ul>
<ul class="sub-menu">
<li class="menu-item menu-item-type-custom menu-item-object-custom">
Seller Dashboard
</li>
</ul>
Instead of using hard-coded sleep I would suggest using wait_for_element_present.
my $locator = q{//a[contains(#href, "/auctions?organization_id=2")]};
$sel->wait_for_element_present($locator, $timeout)
$sel->click($locator);
Example markup of what I have:
<body itemscope='itemscope' itemtype='http://schema.org/WebPage'>
<div id="main" itemprop='mainContentOfPage' itemscope='itemscope' itemtype="http://schema.org/Blog">
<article itemprop='blogPost' itemscope='itemscope' itemtype='http://schema.org/BlogPosting'>
blah blah blah
</article>
<div>
<aside>
<ul>
<li><article><img/>popular post article</article></li>
<li><article><img/>popular post article</article></li>
</ul>
</aside>
</body>
What should I use for the articles within each list item? I thought of articleSection, but that doesn't make sense because it's not within an article schema. So I'm trying to wrap my around the best way to add Microdata here.
Moving the aside within the article isn't really a viable option either. This is Blogger, so doing that would be tricky, especially on the admin widget-management side of things.
Update (2016): In the meantime Schema.org introduced a property to denote that an item is the main/primary one for a page: mainEntity (see details). So the below answer is somewhat out of date.
If they are also blog posts, you would use BlogPosting, too.
Microdata is not only for the main content of a page. However, the Schema.org vocabulary currently lacks a property to mark an item as the main content item of a page (the property mainContentOfPage is only allowed for WebPage).
By using articleBody for the main BlogPosting, capable consumers should be able to deduce that the other BlogPosting items on the page (which naturally don’t have the articleBody property) are only linked/related posts.
So it could look like:
<div itemscope itemtype="http://schema.org/Blog">
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div itemprop="articleBody">…</div>
</article>
<aside>
<ul>
<li>
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<span itemprop="name">Post 4</span>
</article>
</li>
<li>
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<span itemprop="name">Post 5</span>
</article>
</li>
</ul>
</aside>
</div>
I am quite new to these approach in optimizing my HTML with Rich Snippets. I am not sure what is the differences of each of the list items below:
http://schema.org/Article
http://schema.org/BlogPosting
http://schema.org/Blog
I got this code below example below, and I want to know what are the missing items or codes that could optimized a simple blog post that search engines can understand. I'd like to know all the rich snippets available for a blogpost.
<div id="blog_post" itemscope="" itemtype="http://schema.org/BlogPosting">
<h2 itemprop="name headline">Post Title</h2>
<div class="byline">
Written by
<span itemprop="author" itemscope="" itemtype="http://schema.org/Person">
<span itemprop="name">
Author
</span>
</span>
on
<time datetime="2011-05-17T22:00" itemprop="datePublished">Tuesday May 17th 2013</time>
</div>
<div class="content" itemprop="articleBody">Content...</div>
</div>
http://schema.org/Blog can be used on the front page, where you typically find a list of several blog posts (and maybe also for blog-wide things on every page, like the blog name).
http://schema.org/BlogPosting represents a single blog post.
http://schema.org/Article is just more general than http://schema.org/BlogPosting (every BlogPosting is a Article, but not every Article is a BlogPosting). If you have a typical blog, you want to use http://schema.org/BlogPosting.
I'm trying to set up a form in jqtouch with several pages. Basically the user will answer couple questions, go to the next page, answer couple more questions and submit. But Jqtouch doesnt work if I set up one form and put the pages inside of the form tags. Any suggestion how can I solve this problem?
I had the same problem. You're probably using a type of master page to do this, try do pages with form tag like you page tag, eg:
<form id="home" class="current">
<div class="toolbar">
<h1>Title</h1>
<a class="back hidden" id="btBack" runat="server">Back</a>
</div>
<ul>
...
</ul>
</form>