Git Product home page Git Product logo

feed-json's People

Contributors

dependabot-preview[bot] avatar s0ands0 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

feed-json's Issues

How to mention issues within this repository

Feel free to tag this issue or other issues via something like...

git commit -F- <<'EOF'
:heavy_plus_sign: Adds `liquid-utilities/feed-json#1` submodule
EOF

... within comments for projects utilizing code from this repository, and GitHub should cross link things nicely.

Custom entries/extensions support may need added

According to JSON Feed -- Spec -- Extensions "items" may contain custom objects, provided that the key name is prefixed by an underscore, eg...

{
  "items": [
    {
      "_entry_name": {
        "about": "http://example.com/json-feed-extensions/",
        "something": "value"
      }
    }
  ]
}

Likely this feature should be added as FrontMatter configuration for feed.json files, for example something like...

feed.json (snip)

custom_entries:
  - entry_name

`absolute_url` fails silently when `permalink` is defined

Describe the bug

When post.id is undefined, the post.url filtered through absolute_url should be used. Branching via if/else functions as intended, however, for unknown reasons the absolute_url Jekyll filter is failing to produce a full URL. Instead only the collection name and post slug survives.

This seems to be some kind of bug that is triggered when permalink is defined/configured.


Example Setup

_config.yml (snip)

url: 'https://liquid-utilities.github.io'

collections_dir: documentation
collections:
  example-collection:
    output: true
    permalink: /:collection/:name/

_layout/test-absolute-url.html

{% assign collection__data = collection[page.collection_name] %}
{% for post in collection__data %}
  URL: {{ post.url | absolute_url }}
{% endfor %}

documentation/_exapmple-collection/test-absolute-url.md

---
layout: post
title: Tests Absolute URL Filter
description: Example post that collection layout will fail to parse URL for
---

example-collection.html

---
layout: test-absolute-url
collection_name: example-collection
---

Example Results

Build then navigate to example-collection URL similar to; https://<acount>.github.io/<project>/example-collection.html

Output will likely be presented similar to...

URL: /example-collection/test-absolute-url

Expected Behavior

Output should be presented similar to...

URL: https://<acount>.github.io/<project>/example-collection/test-absolute-url

... this is what feed-atom and feed-rss2 layouts from liquid-utilities achieve, and there doesn't appear to be any major differences in how post.url is filtered by absolute_url

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.