https://www.dendron.so/ logo
Join Discord
Powered by
# dev
  • p

    Phantom_4217

    05/24/2021, 8:03 AM
    Can anyone help with this: running following command gives error for podsource: dendron-cli publishPod --wsRoot . --podId hello --podPkg hello-pod --podSource remote --config fname=dendron,vaultName=vault,dest=stdout dendron-cli.js publishPod Invalid values: Argument: podSource, Given: "remote", Choices: "custom", "builtin"
  • h

    hikchoi

    05/24/2021, 10:12 AM
    could you try using
    custom
    instead? looking at the code the only choices here are indeed
    custom
    and
    builtin
    . There is a chance that the documentation is incorrect 😅
  • p

    Phantom_4217

    05/24/2021, 10:25 AM
    custom
    gives Error: no note found at HelloPod.execute and
    builtin
    gives Error: no pod found at fetchPodClassV4
  • h

    hikchoi

    05/24/2021, 10:31 AM
    with podSource set to
    custom
    , try changing
    fname
    to a note that exists. I just tested with a freshly initialized vault that has
    root.md
    in it, and I used :
    Copy code
    sh
    dendron-cli publishPod --wsRoot . --podId hello --podPkg hello-pod --podSource custom --config fname=root,vaultName=vault,dest=stdout
    This seems to work. Can you try this? also, if it works, it will say
    Hello undefined
    at the top. You can pass in
    name=Phantom
    like so:
    Copy code
    sh
    dendron-cli publishPod --wsRoot . --podId hello --podPkg hello-pod --podSource custom --config fname=root,vaultName=vault,dest=stdout,name=Phantom
  • p

    Phantom_4217

    05/24/2021, 10:33 AM
    Thank you soo much 😁. It works
  • h

    hikchoi

    05/24/2021, 10:35 AM
    Nice! I'll make sure the documentation is corrected. Sorry about the confusion.
  • k

    Kiran

    05/24/2021, 10:41 AM
    I can't seem to get the vault snapshot feature to work ... 1. does anyone here use it in their workflow? 2. how do you get it to work?
  • k

    Kiran

    05/24/2021, 10:42 AM
    Asking for a friend 🙂 https://github.com/dendronhq/dendron/issues/542
  • h

    hikchoi

    05/24/2021, 10:54 AM
    looks like the command doesn't specify the destination in the plugin. are you getting
    no dest specified. config: {}
    ?
  • k

    Kiran

    05/24/2021, 10:54 AM
    yes, exactly.
  • k

    Kiran

    05/24/2021, 10:54 AM
    (should've specified that earlier - sorry 😛 )
  • k

    Kiran

    05/24/2021, 10:55 AM
    Is that a command thing or is there a config missing? I looked over our docs for a config for snapshot... doesn't seem to exist?
  • h

    hikchoi

    05/24/2021, 11:01 AM
    I can't recall any config for this on the plugin side. I think this works without any config but recently some validation logic was introduced in exportPod which is causing the problem.
  • k

    kevins8

    05/24/2021, 4:13 PM
    snapshots are broken. something we'll be fixing
  • s

    SeriousBug

    05/25/2021, 6:41 AM
    Is there a function to read the full note contents from a
    NoteProps
    object? I know it has the
    body
    property but I need the full note, including frontmatter.
  • s

    SeriousBug

    05/25/2021, 7:15 AM
    I couldn't find one but I was able to implement it easily.
  • k

    kevins8

    05/25/2021, 1:44 PM
    `NoteUtils.serialize`: https://github.com/dendronhq/dendron/blob/integ-publish/packages/common-all/src/dnode.ts#L775:L775
  • s

    SeriousBug

    05/26/2021, 6:15 AM
    My block anchor HTML generation [code](https://github.com/dendronhq/dendron/blob/block-reference-html/packages/engine-server/src/markdown/remark/blockAnchors.ts) works fine when [testing](https://github.com/dendronhq/dendron/blob/block-reference-html/packages/engine-test-utils/src/__tests__/engine-server/markdown/blockAnchors.spec.ts#L115-L183) but not when I use
    dendron buildSiteV2 --serve
    or if I use the Publish Pod. It just gets converted to HTML as text, like it was never parsed. Is there anything I might be missing?
  • k

    kevins8

    05/26/2021, 3:56 PM
    do you have the raw output of an HTML anchor example when you run buildSiteV2? (heads up - you can just use
    buildSite
    now)
  • h

    henry

    05/26/2021, 4:14 PM
    Thanks for leaving such in-depth feedback! I hope I answered all your questions: https://github.com/dendronhq/dendron/discussions/615#discussioncomment-787262
  • h

    henry

    05/26/2021, 4:16 PM
    Just wanted to update you that there is an MVP version of the graph is up on the
    feature-graph
    branch. Right now the display is just through the
    vscode/graph
    route, but implementation with VSCode will be happening throughout this week
  • s

    SeriousBug

    05/26/2021, 4:37 PM
    Copy code
    <p>^block-anchor</p>
    <p>Lorem ipsum dolor amet ^other-block</p>
  • s

    SeriousBug

    05/26/2021, 4:38 PM
    I had this issue when I was first testing it too. I forget what
    proc
    I was using to test, but they wouldn't parse correctly. I then looked at the example you had sent me which used
    procFull
    so I switched to that and it worked.
  • k

    kevins8

    05/26/2021, 4:44 PM
    the markdown parsing stuff is a bit messy, will be doing some refactoring on it soon
  • s

    SeriousBug

    05/26/2021, 5:11 PM
    Should I make a pull request for the HTML generation then? Or wait until the parsing refactoring? Or, I can try to figure out why it's not working.
  • k

    kevins8

    05/26/2021, 5:12 PM
    would not wait on the refactoring, that's going to take a while
  • k

    kevins8

    05/26/2021, 5:13 PM
    will take a look at your pull request and see if there's anything i can see
  • k

    kevins8

    05/26/2021, 5:41 PM
    The reason your test is passing is because you are using
    procFull
    to render. When we publish, we actually pass the output of
    procFull
    to
    procRehype
    . For testing the compilation of unified plugins, we've created this [harness](https://github.com/dendronhq/dendron/blob/master/packages/engine-test-utils/src/__tests__/engine-server/markdown/utils.ts#L40:L40) to bootstrap with the right processor You can see an example of how it is used [here](https://github.com/dendronhq/dendron/blob/master/packages/engine-test-utils/src/__tests__/engine-server/markdown/wikiLink.spec.ts#L98:L98)
  • s

    SeriousBug

    05/26/2021, 9:49 PM
    It is failing when using the
    createProcForTest
    harness. I also tried splitting
    process
    to individual steps:
    Copy code
    const parsed = proc2.parse(anchor);
    const ran = await proc2.run(parsed);
    const resp = proc2.stringify(ran);
    parse
    parses the anchor correctly:
    Copy code
    {type: "paragraph", children: [
      {type: "blockAnchor",
       value: "^my-block-anchor-0",
       id: "my-block-anchor-0",
    ...
    but
    run
    turns the anchor into a
    p
    :
    Copy code
    {type: "element", tagName: "p", ...
     children: [
       {type: "text",
        value: "^my-block-anchor-0",
    ...
  • s

    SeriousBug

    05/26/2021, 9:49 PM
    Do I need to add some sort of plugin for rehype?
1...666768...108Latest