Giter VIP home page Giter VIP logo

Comments (4)

dg01d avatar dg01d commented on June 11, 2024

I cannot replicate this on my test bare server. In each case (JSON & YAML) slug is returned as a single line, not as an array.

Relevant lines in the script are 592 &subsq:

                // server allows client to set a slug
                if (!empty($props['mp-slug']['0'])) {
                    $frontmatter['slug'] = $props['mp-slug']['0'];
                    unset($props['mp-slug']);
                } elseif (!empty($frontmatter['title']['0'])) {
                    $frontmatter['slug'] = strtolower(trim(preg_replace('/[^A-Za-z0-9-]+/', '-', $frontmatter['title'])));
                } else {
                    $frontmatter['slug'] = $udate;
                }

from nanopub.

dg01d avatar dg01d commented on June 11, 2024

This should now act as expected, following commit b5f86b5.
Please test and confirm.

from nanopub.

paulrobertlloyd avatar paulrobertlloyd commented on June 11, 2024

I’m still seeing the same issue – however, this is when I send a slug value. When I send mp-slug, everything works as expected. I’m testing using Quill, which gives you the option, and suggests that slug has been deprecated. So, short of supporting both values, using mp-slug fixes this issue.

from nanopub.

dg01d avatar dg01d commented on June 11, 2024

Added note to the README regarding this matter. Deprecated formats are a matter for client, not server. Accordingly, I'm marking this as closed.

from nanopub.

Related Issues (16)

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.