Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 898657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:04:57+00:00 2026-05-15T15:04:57+00:00

My blog, powerred by Jekyll , serves out a Atom feed. — layout: nill

  • 0

My blog, powerred by Jekyll, serves out a Atom feed.

---
layout: nill
rooturi: http://stefan.artspace44.com
---

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

...

{% for post in site.posts %}
  <entry>
    <title>{{ post.title }}</title>
    <link href="{{ page.rooturi }}{{ post.url }}" />
    <updated>{{post.date | date_to_xmlschema }}</updated>
    <id>{{ page.rooturi }}{{ post.id }}</id>
    <content type="html">{{ post.content | xml_escape }}</content>
  </entry>
 {% endfor %}
</feed>

I need to change the content of each post, so that

<img href="/images/01.jpg" />
<a href="/2010/post/">Post</a>

becomes:

<img href="http://stefan.artspace44.com/images/01.jpg" />
<a href="http://stefan.artspace44.com/2010/post/">Post</a>

I was thinking of doing something along the lines of

<content type='html'>
  {{ post.content | make_hrefs_base page.rooturi }}
</content>

Where would I code this in jekyll or liquid, and how could I solve the problem of changing only the href values that point to “/” and not “http://otherdomain.com/“?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T15:04:58+00:00Added an answer on May 15, 2026 at 3:04 pm

    Where would I code this in jekyll or liquid?

    In the recently-released Jekyll 0.6.0, you can create your own plugins, including Liquid tag plugins. You can check out the Jekyll plugin documentation for more info, but that would be your best bet.

    How could I solve the problem of changing only the href values that point to “/” and not “http://otherdomain.com/“?

    Seems pretty easy. In your custom Liquid tag, check to see if the first character is a ‘/’; if it is, then prepend your new domain. You could probably use a Ruby HTML parser to find all instances of <a>, and then change the href attributes as appropriate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

got a new blog at wordpress few days ago ( http://ghads.wordpress.com ) and I
This blog post ( http://williamedwardscoder.tumblr.com/post/18319031919/programming-language-readability ) contains implementation of autocompletion in Haskell and Python
What blog software and theme is used at http://mmcgrana.github.com/ ? (e.g. Wordpress with Forest
A blog post - http://petewarden.typepad.com/searchbrowser/2011/05/using-hadoop-with-external-api-calls.html - suggests calling external systems (querying the twitter API,
This blog http://blogs.msdn.com/sqlserverstorageengine/archive/2009/01/04/managing-tempdb-in-sql-server-tempdb-configuration.aspx states that it is a good idea to Spread TempDB across
This is my blog: http://laschavasdeflickr.blogspot.com As you can see there is a grey line
Blog URL: http://madhurtanwani.blogspot.com I'm trying to optimize my blog's title and description tags and
http://blog.helpcurenow.org/test/mockups/mar2010/lp.html In the above landing page, I have an offers box that has four
i want build a blog using jekyll and octopress. but an error happened when
http://blog.helpcurenow.org I'm working on the development of this blog and it seems ie7 and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.