-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specification #13
Comments
Agreed. You already mentioned, but just to concur, the main items I see to address:
What's cool is seems like the spec really doesn't need much. I feel like once we agree on the above the spec is more or less there, since any other keys (things like title, text, etc) are really up to the implementer to decide. FWIW, gonna give my initial 2-cents on the above 6:
More or less, the shape based on above looks like: {
'/': {
url: '/'
},
'/about': {
url: '/about',
title: 'About',
text: 'Beep Boop',
_loaded: true
},
'/about/file.jpg': {
url: '/content/about/file.jpg',
sizes: {
500: '/content/about/file-500.jpg',
1000: '/content/about/file-1000.jpg',
1600: '/content/about/file.jpg', // full size file
},
dimensions: {
width: 1600,
height: 1200,
ratio: 75
}
}
} Happy to expand if any q's! |
Gonna close this in favor of the conversation being moved to a separate schema repository. |
@jondashkyle ping me when you start the schema respository! I couldn't get to this earlier in the week but I think this is a great idea and have a few things to contribute. Generally, though +1 to everything above |
Talking about this with @jongacnik this recently, we began thinking it could be useful to create a formal specification for the type of data structure
nanopage
digests. This would then be applied tohypha
,enoki
, and other libraries could hook into this and reference it, too. A good example ismonoimage
.The discussion surrounding image sizes is a good example of what could be covered in this specification. The flat-structure and paths as keys is another good example.
Another discussion could be around urls. For instance, hypha generates
url
,path
, andsource
keys, each which behaves differently and is at the moment somewhat convoluted.url
is the formatted path (e.g./about
)path
is the actual path to the content (e.g./content/about
)source
is the remote path for content which exists elsewhere (e.g.https://example.com/content/about
)Part of this specification could be a testing tool to ensure data is structured correctly. In this way, you wouldn’t be required to follow step-by-step to follow the specification, but could simply evaluate your tool against the specification.
Looking to collect some good resources here, and perhaps we can create a repository for this.
@jongacnik @s3ththompson
The text was updated successfully, but these errors were encountered: