Comments (4)
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.
This should now act as expected, following commit b5f86b5.
Please test and confirm.
from nanopub.
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.
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)
- Check Authorization header case-insensitive. HOT 4
- Syndication not working. HOT 2
- Add support for YAML front matter format HOT 4
- Feature request: Allow querying weather service to be optional feature HOT 3
- composer.lock should reflect current dependancies HOT 2
- Feature request: Allow folder locations to be customised HOT 3
- Generated file is always named Array.md HOT 3
- Feature request: Publish to GitHub HOT 1
- Plugin mechanism HOT 2
- Undefined indices HOT 3
- Uncaught Exception call to Symphony\yaml HOT 3
- Installation clarification HOT 3
- Possible to set the config.php values from env var? HOT 1
- Understanding the nanopub flow HOT 1
- storeFolder and trashFolder are still hardcoded (in the source of the 1.5.1 zip) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nanopub.