         # Use path as ID since it should be pretty stable
         data.id = data.path
         # Use filepath as URL at first (gets changed during output)
-        data.url = data.path
-        if config.pretty_urls
-          data.url = helpers.stripExtension file
+        data.url = "/" + data.path
+        # Use permalink as id
+        data.id = data.url
 
         data.content = content
 

    data or= {}
    # Save original filepath
    data.path = file
    # Use path as ID since it should be pretty stable
    data.id = data.path
    # Posts are published by default
    unless 'published' of data
      data.published = true

      data.categories = (data.categories or []).concat directoryCategories
    # Calculate the permalink
    data.url = getPermalink slug, data, config.permalink
    # Use permalink as unique ID
    data.id = data.url

    data.content = content

