-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Optional endpoint for content type #13
Comments
In talking through this with @stephanieluz, the ideal workflow would be:
<script>
export let allNodes;
import { makeTitle } from '../scripts/make_title.svelte';
</script>
{#each allNodes as node}
{#if node.type != "your_type"}
<a href="{node.path}">{makeTitle(node.filename)}</a>
{/if]
{/each} This would negate the need for a |
Checking for a corresponding svelte template during the build in data_source.go works pretty well. That way we can still add the content source to the If you iterate over With this approach you don't need a |
Ahh nope, I was wrong above:
What was really happening is I was ending filepath.Walk prematurely before writing to the nodes.js file, which the client uses for the |
It would be useful to be able to define a Type that does not have an endpoint.
Scenario 1: You want a type called
content/main_menu/
to hold link information for a navbar.Scenario 2: You have a component with information that you want to be able to share across different pages but it needs to be flexible enough that it shouldn't be hard-coded into a template.
In either scenario you don't want a node / endpoint that visitors can go to directly, you just want to pull the data in from the
allNodes
prop and use it however you'd like. Users should be able to extend the site config file (plenti.json
) to account for this, something like:Currently the only replacement pattern we account for is
:filename
, but should extend this to look for:none
.It would also be nice to be able to specify this when creating a new type by using a flag:
plenti new type <type_name> --endpoint=false
The text was updated successfully, but these errors were encountered: