Comments (4)
Hi dear @ramsesgarate. I think that's a nice idea and can think of several ways to make it possible from modules injecting their templates. Dicussion tag means we are open to discuss about it and find possible solutions.
from cli.
What does the tag discussion mean? @danielroe
Greetings
from cli.
I understand, I think I got too complicated saying templates haha the truth is I had thought of something a little simpler, based on how it currently works creating pages with nuxi add, for content I would return something like
return {
path: `content/${name}.md`,
contents: `
# ${name} content v2
[Back home](/)
`
}
This would also be useful if you want to create a page with order prefixes like nuxi add content 1.about
, ignore nuxi add content .1.about
or partiarls nuxi add content _1.about
.
from cli.
It would be really nice to have some section like templates
in the nuxt.config.ts
which expects an array of interfaces from the source code
interface Template {
(options: TemplateOptions): { path: string, contents: string }
}
then we can load it either from a layer or module, etc.
Should we expect this feature in one of the subsequent releases? 🤔
from cli.
Related Issues (20)
- Dev server crashing when nuxt is restarted
- Migrate to `cwd` in loadNuxt
- Stuck on prepare after types generated with no error... HOT 4
- Integrate with Nitro Tasks
- Nuxt failed to run in Fedora Linux 39 LXQt spin HOT 2
- Load nuxt config with different `envName` for env-specific configs HOT 7
- Nuxt reads a different env file if value is not found in the configured env file HOT 1
- `nuxt module add` -> select the `nuxt.config.ts` to install when working with layers
- Support `--cwd` before subcommands
- Export useful utils
- Can't set app.buildAssetsDir when using Nuxi 3.11.0
- Custom hostname as local address HOT 3
- when using `--host` flag on one project, local always opens on :3000 HOT 2
- Show warning if build process is hanging afteer is done
- Proposal: init test setup with Nuxi HOT 4
- preview command failed with nitro.output.dir HOT 1
- nuxt preview does not respect the --dotenv option HOT 2
- Post installation script fails when using bun for windows HOT 9
- install module peer-dependencies HOT 2
- The problem of verifying whether it is a nuxt module when adding a module
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 cli.