# Selective Publication

In Dendron, you control what gets published.

Dendron lets you control publication behavior at multiple levels:

• globally using dendronConfig.site
• per hiearchy through dendronConfig.site.config
• per note through the publication related frontmatter
• per line through custom dendron directives inside the note

## Globally

### siteHierarchies (required)

• default: [root]

List of hierarchies to publish. root is a special value that means publish all.

## Hierarchy Configuration

You can update configuration on a per hierarchy level by modifying site.config like in the example below

site:
config:
dendron:
publishByDefault: true
...


To set options for all hierarchies, set {hiearchy name} to root.

### publishByDefault

• default: true
• values: true|false|hashByVault

If set to false, dendron will only publish notes within the hierarchy that have published: true set in the frontmatter

If set as a hash, you can further specify publishByDefault settings on a per vault basis. The key is the name of the vault and the value is a boolean.

For example, the following config says that the finance hierarchy in the public vault should all be published but that the finance hierarchy in the private vault should not

site:
config:
finance:
publishByDefault:
public: true
private: false


## Note Configuration

You can specify how notes are published via the frontmatter of each note.

### published

• default: true

To exclude a page from publication, you can add the following to the frontmatter. If you set publishByDefault: false for a hierarchy, this needs to be set to true to publish

...
published: false


## 403 Page

If you link to a page that is not published, Dendron will show users a 403 page with the following content