https://www.dendron.so/ logo
Join Discord
Powered by
# questions
  • t

    TomDuffield

    03/25/2022, 2:54 AM
    presumably I need to declare a single root a la https://github.com/dendronhq/schema-library/blob/main/vault/root.schema.yml across all my vaults?
  • t

    TomDuffield

    03/25/2022, 2:55 AM
    trying to figure out what schema pattern I should use when I have the same schema across multiple vaults. Do I need to duplicate the schemas?
  • k

    kevins8

    03/25/2022, 2:59 AM
    ah, no. as long as the starting pattern is unique, it will be automatically attached to the root
  • t

    TomDuffield

    03/25/2022, 3:01 AM
    does each vault need a root schema declaration?
  • t

    TomDuffield

    03/25/2022, 3:02 AM
    and based on your statement above, I can import schemas from other vaults?
  • s

    SeriousBug

    03/25/2022, 3:02 AM
    A schema in one vault will apply to all vaults, so you don't have to duplicate or import them if you have multiple vaults
  • s

    SeriousBug

    03/25/2022, 3:03 AM
    Dendron automatically creates a
    root.schema.yml
    for each vault, which is required. You don't have to use that as your schema though, you can create a new schema with the schema lookup.
  • t

    TomDuffield

    03/25/2022, 3:06 AM
    what does it mean when my schema graph is blank/white — presumably I have some schema error somewhere?
  • s

    SeriousBug

    03/25/2022, 3:08 AM
    It also could be a bug with the schema graph 😅 Can you try reloading? (Developer: Reload Window command, or close and reopen VSCode) You should also try if your schemas are actually working, try doing a lookup to see if it shows you the book symbol which means it matches. (it will show symbol for existing notes that match)
  • t

    TomDuffield

    03/25/2022, 3:10 AM
    hmm...no book. Can a "domain" just be digits (e.g. the year)?
  • s

    SeriousBug

    03/25/2022, 3:11 AM
    Yup, that should be fine. You can share your schema if it's not confidential and we can take a look
  • t

    TomDuffield

    03/25/2022, 3:11 AM
    Copy code
    version: 1
    imports: []
    schemas:
      - id: yearly_log
        pattern: '20[0-9][0-9]'
        parent: root
        children:
          - id: monthly_log
            pattern: "[0-1][0-9]"
            children:
              - id: rapid_log
                pattern: "W[0-5][0-9]"
                children: []
  • t

    TomDuffield

    03/25/2022, 3:15 AM
    Is it supported to have a schema as both a top-level schema, and an imported child schema?
  • t

    TomDuffield

    03/25/2022, 3:15 AM
    Copy code
    version: 1
    imports: []
    schemas:
      - id: resource
        pattern: r
        parent: root
        namespace: true
  • t

    TomDuffield

    03/25/2022, 3:15 AM
    Copy code
    version: 1
    imports:
      - project
      - meeting
      - resource
    schemas:
      - id: archive
        pattern: a
        parent: root
        children:
          - project.project
          - meeting.meeting
          - resource.resource
  • t

    TomDuffield

    03/25/2022, 3:15 AM
    @User :this:
  • s

    SeriousBug

    03/25/2022, 3:16 AM
    I'm trying out your schema, it doesn't seem to work for me either. Let me see if I can figure out why it doesn't match.
  • t

    TomDuffield

    03/25/2022, 3:36 AM
    I don't think it likes the combination of
    parent: root
    and
    pattern
    .
  • k

    kevins8

    03/25/2022, 3:37 AM
    i don't think we support setting a pattern as the top level element of a schema
  • t

    TomDuffield

    03/25/2022, 3:40 AM
    it also looks like you don't support multiple
    parent: root
    in a schema file?
    Copy code
    version: 1
    imports: []
    schemas:
      - id: '2021'
        parent: root
        children:
          - monthly_log
      - id: '2022'
        parent: root
        children:
          - monthly_log
      - id: monthly_log
        pattern: '[0-1][0-9]'
        children:
          - id: rapid_log
            pattern: 'W[0-5][0-9]'
            children: []
  • k

    kevins8

    03/25/2022, 3:44 AM
    yep
  • t

    TomDuffield

    03/25/2022, 4:05 AM
    Thanks @User and @User — I've got that specific schema fixed but I'm still getting the blank schema graph. 😥 Gonna see if I can figure out what is wrong...
    t
    • 2
    • 1
  • d

    dagriefaa

    03/26/2022, 3:01 AM
    what's the difference between the dendron markdown shortcuts and the normal markdown shortcuts extensions?
  • k

    kevins8

    03/26/2022, 3:17 AM
    no difference - we needed to support it for both vscodium and vscode so forked it and published it to vscodium as well
  • a

    alukach

    03/26/2022, 5:22 AM
    Is it possible to rename journals under a given hierarchy? I see that in my
    dendron.yml
    file, I can change the name of a journal:
    Copy code
    yaml
        journal:
            dailyDomain: daily
            name: journal
            dateFormat: y.MM.dd
            addBehavior: childOfDomainNamespace
    Is it possible to have it so that under the hierarchy of
    work.*
    , any time that I press `CMD`+`SHIFT`+`J`, it opens a doc in
    work.*.meeting.{y}.{MM}.{dd}
    , however the name would still be called
    journal
    in other hierarchies?
  • a

    alukach

    03/26/2022, 6:02 AM
    I've managed to get it so that I can have journals appear in my domain namespace via the
    addBehavior: childOfDomainNamespace
    configuration mentioned above. However, is it possible to configure journals in a namespace's schema? For example, in
    prj.schema.yml
    , I have it specified that
    journal
    is a child.
    journal
    is specified with a pattern for the date format. What I'd love to get is a way to press
    CMD+SHIFT+J
    to open a prompt to create a journal at
    proj.my_proj.journal.2022.03.22
    , but then be able to to press
    . + TAB
    and be able to see potential files specified in my schema. For example, I'd like to be able to create notes for a standup at
    proj.my_proj.journal.2022.03.22.standup
    with a preset template, along with other meeting types. This way, I can quickly drop into templated meeting notes for various meeting types (design sessions, standups, retrospectives, etc) for any given day. Does this all make sense? Is this possible? Does this fit in with the zen of Dendron? I'm very new to the tool and am still onboarding.
    Copy code
    yml
    version: 1
    imports: []
    schemas:
      - id: prj
        parent: root
        title: project
        desc: project note helpers
        namespace: true
        children:
          - journal
    
      - id: journal
        title: journal
        parent: root
        children:
          - id: year
            pattern: "[0-2][0-9][0-9][0-9]"
            children:
              - id: month
                pattern: "[0-1][0-9]"
                children:
                  - id: day
                    pattern: "[0-3][0-9]"
                    children:
                      - id: standup
                        title: standup
                        desc: "standup"
                        template: templates.standup
  • s

    SeriousBug

    03/26/2022, 6:04 AM
    You could do that, just in two steps. You'd need to first create the journal note with
    Cmd+Shift+J
    , then bring up the lookup with
    Cmd+L
    . The lookup will have the current note pre-filled, and I believe it should suggest matching schemas as potential new files you could create.
  • a

    alukach

    03/26/2022, 6:12 AM
    Thanks. Everything you're suggesting checks out up until the part of "suggest matching schemas as potential new files you could create." Does my schema look correct to you? I think my problem may be that
    journal
    isn't really a child of
    prj
    , rather it's like
    prj.foo.journal.2022.03.22
    (note
    foo
    )
  • s

    SeriousBug

    03/26/2022, 6:14 AM
    I haven't tried running your schema, but yes something can't have multiple parents. You should remove
    parent: root
    from
    journal
    because it's parent is
    prj
    (it should work with the namespace so it will match
    prj.*.journal
    )
  • a

    alukach

    03/26/2022, 6:16 AM
    ahhh, the
    parent:root
    was indeed m problem. It all works exactly as I had hoped (in one step, can create the
    prj.foo.journal.2022.03.22.standup
    )! Many thanks
1...578579580...757Latest