GithubHelp home page GithubHelp logo

Named slots about keystone-ssg HOT 4 OPEN

karneaud avatar karneaud commented on May 30, 2024
Named slots

from keystone-ssg.

Comments (4)

CTNicholas avatar CTNicholas commented on May 30, 2024

Hi, I'm sorry I don't think it does! Keystone is getting a little old now. If you're after something newer there's some really cool tools, in particular Astro, which can be used for similar purposes!

from keystone-ssg.

karneaud avatar karneaud commented on May 30, 2024

Keystone is getting a little old now.

Oh man that's sad to hear. I took a look at Astro and it was a bit much for what I wanted to do. Keystone really has the exact philosophy and concept that I'm looking for.

I want to try to take a look at it in in-depth and implement some new features if I can and submit a pull request.

from keystone-ssg.

karneaud avatar karneaud commented on May 30, 2024

I was hoping for implementing features similar to https://sergey.cool/. What I did not like about sergey is its recompile concept.

from keystone-ssg.

CTNicholas avatar CTNicholas commented on May 30, 2024

Oh right, yes Astro can do a lot! But it's also really good at plain HTML slots too:
src/components/Layout.astro:

---
const { title = 'Fallback if no title passed' } = Astro.props
---
<html lang="en">
  <head>
    <title>{title}</title>
  </head>

  <body>
    <slot name="main">
      Fallback content if no slot provided
    </slot>
  </body>
</html>

src/pages/index.astro:

---
import Layout from '../components/Layout.astro'
---
<Layout title="My title">
  <div slot="main">
    Main content
  </div>
</Layout>

Though in saying that, I'll happily review any changes you make to Keystone 😄

from keystone-ssg.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.