This project is read-only.

Hide Published Date From ViewSource

Topics: Customizing Orchard, General
Aug 31, 2015 at 8:17 PM
Edited Aug 31, 2015 at 8:19 PM
I don't want my articles to show any date as I want them to be evergreen. Through CSS manipulation I was able to suppress display of Published Date, which is great. However, the published date still shows up if you do a "view source" on the page. As a result when someone google's for my articles, SERP shows the published date. That is really bad for my business as that makes my article look really dated.

How do I remove published date altogether? But it only needs to be done for articles and not for blogs. I do want my blogs to have dates.

Here's an example of Published date that shows up in view source:
        <div class="metadata">
            <div class="published">Monday, October 20, 2014 3:39:00 PM</div>

Aug 31, 2015 at 8:43 PM
In your theme, you can update your file to not render the Parts_Common_Metadata shape for the BlogPost content type. For example:
<Match ContentType="BlogPost">
    <Place Parts_Common_Metadata="-"/>
You can read more about placement here:
Sep 2, 2015 at 4:40 AM

I actually need Blogs to display date. What I did in the is to add the following:
<Match DisplayType="Detail">
    <Place Parts_Common_Metadata="-"/>
<Match DisplayType="Summary">

    <Place Parts_Common_Metadata="-"/>
That seems to have worked. Now the articles do not have dates in the "view source". But, it has also introduced some issues in RSS.
The articles RSS feed is now using CreatedDate for <pubdate>, although the articles are coming sorted by the "true" publish date - which is good.

Do you know if this is a bug or whether this is per design, that is, <pubdate> to show createdDate.

Another strange thing I noticed: I removed my config changes but the RSS feed is still using "createdDAte" for <pubdate>. I was expecting the real published date to show up
Why is that?