Comments (7)
I'm not sure if this is what you need
from velite.
Almost. Is there a way to define the schema of this (plus be a singleton)?
from velite.
Almost. Is there a way to define the schema of this (plus be a singleton)?
Of course, this is not type safe. If you need a type safe schema, the best way is to define collection (single or collection)
from velite.
The request is to be able to define collections without specifying the path and require the end user to populate these collections.
from velite.
The request is to be able to define collections without specifying the path and require the end user to populate these collections.
I know what you mean, but I think the current solution is to define a virtual pattern, which will not cause any problems
const tags = defineCollection({
name: 'Tag',
pattern: 'fake-path',
schema: s
.object({
// ...
})
})
from velite.
ping @Adriel-M
from velite.
Yup that worked for me!
from velite.
Related Issues (20)
- Error on top level array for JSON/YAML HOT 2
- Suggestion: Generate json schemas for json/yaml files HOT 1
- Doesn't rebuild collections when modifying methods outside of velite config file HOT 1
- Auto-generate a unique id for every content item HOT 2
- Path option for `s.image()` HOT 5
- Image Blur size is tool small to use, expose an option for setting it. HOT 2
- Build dependencies behind this expression are ignored and might cause incorrect cache invalidation.
- Working with 3000+ files. Out of Memoy HOT 1
- What is the purpose of the Recipes(especially typescript) in the documents? HOT 3
- Unhandled Runtime Error When using remarkCodeHike HOT 1
- Weird Page Freeze when Navigating via Table of Contents Links HOT 1
- Is it possible to use files stored inside github repo? HOT 4
- [feature request] handle contents failing schema validation, or autofixing HOT 8
- Handling relationships HOT 4
- TOC breaking change/broken on latest release HOT 3
- The provided config in #37 resolves warning in dev mode but still present in deployment HOT 1
- Webpack cache warning HOT 2
- Property does not exist on type '{ props: { readonly components?: {} | undefined; }; }' .ts-plugin(2339) HOT 1
- `prepare`, `complete` events access to configuration `output` object HOT 3
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 velite.