Giter VIP home page Giter VIP logo

Comments (6)

N-Parsons avatar N-Parsons commented on September 24, 2024

Hi @paulhibbitts. Thanks for your feedback and testing!

You are very correct that there's currently an issue with the anchors!

They are missing the cite- part in the templates, so I've fixed that now, but there seems to be a wider issue with numeric IDs. This will be caused by PHP and/or Twig treating the numeric ID as an index of the list, rather than as a key. I'll have a play around tomorrow and fix this.

The plugin only shows references that have been cited in the page, so only one showing up is by design if you have only cited one. Thinking about it now, I can imagine a use-case where someone wants all to show even if some are not explicitly cited, and perhaps even to use it as a list of references for further reading without any explicit citations. I'll try to implement a configuration option for this.

I'll create a configurable default in the plugin config, a page header override, and something like `[cite all=true /]' for the shortcode.

If you have any feature requests, feel free to create issues for them.

from grav-plugin-shortcode-citation.

paulhibbitts avatar paulhibbitts commented on September 24, 2024

Thanks for looking into this @N-Parsons. The new release helps the anchor issue but looks like other issues remain as you allude to. If it helps, here is my test Markdown:

---
title: 'Test Page'
date: '14:15 24-07-2019'
references:
    -
        id: '1'
        type: book
        title: 'Reference One'
    -
        id: '2'
        type: book
        title: 'Reference Two'
---

Some sample text. [cite=1 /]

More sample text.[cite=2 /]

And yet some more sample text.  

And yet some more sample text.  

And yet some more sample text.  

And yet some more sample text.  

And yet some more sample text.  

And yet some more sample text.  

And yet some more sample text.  

And yet some more sample text.  

And yet some more sample text.  

And yet some more sample text.  

And yet some more sample text.  

And yet some more sample text.  

And yet some more sample text.  

And yet some more sample text.  

And yet some more sample text.  

[cite /] 

And here is the resulting page:
2019-07-24_14-21-24

Thanks again, and please let me know when it's a good time for me to test things again.
Paul

from grav-plugin-shortcode-citation.

N-Parsons avatar N-Parsons commented on September 24, 2024

Hi @paulhibbitts. The issue with numeric IDs is now fixed in the latest release. I've tested it, and it seems to be working correctly, so I'll close this issue now, but if you have any more trouble, just give me a shout.

I will continue to work on the extra configuration options.

from grav-plugin-shortcode-citation.

N-Parsons avatar N-Parsons commented on September 24, 2024

@paulhibbitts, the extra functionality discussed above has now been added in PR #3 if you want to test it again. :)

from grav-plugin-shortcode-citation.

paulhibbitts avatar paulhibbitts commented on September 24, 2024

Thanks so much @N-Parsons , I can confirm that the issue of the missing citation is now not present. Not quite sure if I was able to download and install the right ZIP archive for testing the PR... once you are ready to release I will re-test and report back. Thanks again for this really useful Plugin for open educators and publishers!

from grav-plugin-shortcode-citation.

N-Parsons avatar N-Parsons commented on September 24, 2024

Hi @paulhibbitts, you can now grab the pre-release from here: https://github.com/N-Parsons/grav-plugin-shortcode-citation/releases/tag/v0.2-alpha

from grav-plugin-shortcode-citation.

Related Issues (5)

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.