Skip to content

Commit

Permalink
Rename "unlisted" into "draft".
Browse files Browse the repository at this point in the history
  • Loading branch information
olafurpg committed Apr 29, 2019
1 parent 26aee90 commit 031c2cb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/docusaurus-1.x/lib/core/BlogPageLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const BlogSidebar = require('./BlogSidebar.js');
const Container = require('./Container.js');
const MetadataBlog = require('./MetadataBlog.js');

const MetadataPublicBlog = MetadataBlog.filter(item => item.unlisted !== true);
const MetadataPublicBlog = MetadataBlog.filter(item => !item.draft);
const Site = require('./Site.js');
const utils = require('./utils.js');

Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-1.x/lib/core/BlogSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const SideNav = require('./nav/SideNav.js');

const MetadataBlog = require('./MetadataBlog.js');

const MetadataPublicBlog = MetadataBlog.filter(item => item.unlisted !== true);
const MetadataPublicBlog = MetadataBlog.filter(item => !item.draft);

class BlogSidebar extends React.Component {
render() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Truncation Example
unlisted: true
title: Draft Example
draft: true
---
This blog post should not appear in the sidebar or the blog feed.
This blog post should not appear in the sidebar or the blog feed because it is a draft.
4 changes: 1 addition & 3 deletions packages/docusaurus-1.x/lib/server/feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ module.exports = function(type) {

readMetadata.generateMetadataBlog();
const MetadataBlog = require('../core/MetadataBlog.js');
const MetadataPublicBlog = MetadataBlog.filter(
item => item.unlisted !== true,
);
const MetadataPublicBlog = MetadataBlog.filter(item => !item.draft);

const feed = new Feed({
title: `${siteConfig.title} Blog`,
Expand Down

0 comments on commit 031c2cb

Please sign in to comment.