Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't put url on post metadata and pull them via the template engine #95

Open
fabricioanciaes opened this issue Jan 2, 2019 · 2 comments

Comments

@fabricioanciaes
Copy link

I was trying to put urls in the post listings. Sort of a featured image for each post.

---
layout: post
title: New feature TEST
excerpt: Cum sociis natoque penatibus et magnis dis parturient montes...
author: Chris
image: http://placehold.it/300x300

---

As a test I've put a url.

Then modified the layout on the post listings to reflect the changes:

<% if(post.image) { %>
  <div class="post-image">
    <img src="<%= post.image %>" alt="">
  </div>
<% } %>

and the output html looks like this:

<div class="post-image">
  <img src="http" alt="">
</div>

Is it intentional? I suppose the // in the url are getting escaped by themselves.

@chrisdiana
Copy link
Owner

At first glance this looks like a bug with the front matter parser. Definitely not intentional behavior. Probably right that the "//" is getting escaped or there might be a split by ":" that's causing the issue.

@cdp1337
Copy link

cdp1337 commented Nov 5, 2022

image

I recently found this project and am having some fun. ;)

cdp1337 added a commit to cdp1337/markdownmaster that referenced this issue Nov 8, 2022
Fixes:

Images/hyperlinks within meta tags
chrisdiana/cms.js#95

Google crawler issues
chrisdiana/cms.js#93

URLs using history instead of hashes
chrisdiana/cms.js#80

Also:
Embedded marked in the example as a default option for users
Implement github CI on pushes to verify repo
Include example site in deployed package
Switch onroute and onload to be separate methods outside of the config
object
Add dynamic page titles based on content
Add dynamic Last-Modified headers for automatic post dates
Add support for nested content
Add support for paths in the URL
Retool search to support searching body content
Add method to retrieve all tags for a given collection
Add SEO-specific page title (text that displays in the browser for the
page)
Add support for images within metadata (goes along with the bugfix)
Fix onroute to only be called AFTER the content has been rendered
Add debug logging method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants