Datacore is still in early development

Not all features may work correctly

Cache behavior

Files containing Datacore queries are automatically detected and flagged as containing dynamic content. These files are always recompiled when you open the Publication Center, ensuring query results reflect the current state of your vault.

The output is then compared against the published version—if the compiled result is identical, the file won’t appear as changed.

Supported features

Datacore Views

datacorejsx
return function View() {
  return <p>Hello!</p>;
}

Hello!

Datacore Lists

datacorejsx
return function View() {
  const pages = dc.useQuery('@page and #datacore');
  
  return <dc.List rows={pages} renderer={pages => pages.$link} />;
}

Datacore Tables

datacorejsx
return function View() {
  const pages = dc.useQuery("@page and #datacore");
 
  const COLUMNS = [
    {id: "Name", value: page => page.$link},
    {id: "Tags", value: page => page.$tags}
  ];
  
  return <dc.Table rows={pages} columns={COLUMNS} />;
}

Datacore Cards

datacorejsx
return function View() {
  return <dc.Card title={"Test"} content={"Testing out a card"} footer={"Hello!"} />;
}
Test
Testing out a card

Datacore Callouts

datacorejsx
return function View() {
  return <dc.Callout title={"Test"} collapsible={true} open={true}>Hello!</dc.Callout>;
}
Test
Hello!

See also