jekyll / jekyll-admin

A Jekyll plugin that provides users with a traditional CMS-style graphical interface to author content and administer Jekyll sites.
https://jekyll.github.io/jekyll-admin/
MIT License
2.82k stars 357 forks source link

I can't enable draft option in jekyll admin sidebar #600

Closed Grifo89 closed 3 years ago

Grifo89 commented 3 years ago

I'm trying to figured out how to add draft option in the sidebar but I can't find how. I appreciate the help.

ashmaroli commented 3 years ago

It should render automatically if there are drafts in the site. Have you enabled drafts for the Jekyll site? Either via config file or via the terminal:

bundle exec jekyll serve --drafts
Grifo89 commented 3 years ago

Yes, it works! Thank you!! @ashmaroli

vcavallo commented 1 month ago

This isn't working for me. i'm runnning jekyll serve with --drafts (and I do see the items in _drafts on the served site) but the /admin interface doesn't show drafts anywhere. Furthermore, I have this in my _config.yml:

jekyll_admin:
  show_drafts: true
  homepage: "posts"

For what it's worth, the homepage isn't rendering "posts" but the default "pages", and the "Error could not fetch the config" message still appears (but the "configuration" item in the sidebar does show my current _config.yml

vcavallo commented 1 month ago

Okay, fixed it. I needed to have show_drafts: true in my top level config:

show_drafts: true
jekyll_admin:
  # hidden_links:
  #   - pages
  #   - staticfiles
  #   - datafiles
  #   - configuration
  homepage: "posts"
vcavallo commented 1 month ago

Problem with that is the drafts show up on the live site...