Giter Club home page Giter Club logo

Comments (11)

oleeskild avatar oleeskild commented on August 25, 2024 4

I am working on a release which will make it alot easier to manage and apply the dg-publish attribute to many notes at a time. Hopefully these two features combined will solve your problem. I'll let you know when the release becomes available

from obsidian-digital-garden.

meleu avatar meleu commented on August 25, 2024 1

Yeah, that would surely be cool (choose specific directories in a filetree).

However, my first thought was something as simple as what we have in Settings > Files & Links > Default location for new notes:
choose-dir

It could be something like "Default location for public notes", and then every note inside that location (subdirs included) would be automatically published, except the notes with an explicit dg-publish: false.

from obsidian-digital-garden.

dclausen01 avatar dclausen01 commented on August 25, 2024 1

This feature would be awesome, would make my life easier ;)

from obsidian-digital-garden.

vanadium23 avatar vanadium23 commented on August 25, 2024 1

You can use Templater with option to create an empty note with enabled frontmatter.

image

from obsidian-digital-garden.

vanadium23 avatar vanadium23 commented on August 25, 2024 1

Yeah, I think it can be add as a tip :)

from obsidian-digital-garden.

meleu avatar meleu commented on August 25, 2024 1

Although the Templater seems to be a really handy way to start creating notes that will be public, I think it doesn't fully address the feature request.

Example: if I have a directory with subdirectories and full of hundreds of notes. If I understood correctly Templater is not able to go into each one of the notes and add the dg-publish: true in the frontmatter.

Anyways, the solution we've found so far (the shell script and the Templater plugin) is ok for my current workflow. So, yeah, I also consider this issue as "closed.

Thanks guys! :)

from obsidian-digital-garden.

meleu avatar meleu commented on August 25, 2024

As a workaround, I've created this script: https://gist.github.com/meleu/f9667e76a2744d46686702edeb3cc77c

Requirement: the vault itself must be a git repository (what I usually do).

The script adds a dg-publish: true to all versioned *.md files that don't have a dg-publish: defined in it's frontmatter.

Consequences of this:

  • non versioned files won't be affected (e.g.: gitignored files)
  • files without any frontmatter will have one with dg-publish: true
  • files with a dg-publish: (any value) in its frontmatter won't be touched

While the feature requested in the OP is not implemented, I'll be using that script as pre-commit git hook.

from obsidian-digital-garden.

oleeskild avatar oleeskild commented on August 25, 2024

Thanks for providing a workaround. Hopefully it will serve as a solution for people until this is properly supported.

I'm thinking that this could be implemented by creating a GUI presenting you with the filetree of your vault which would allow you to select folders and/or notes and marking them all with dg-publish: true with the press of a button. Also, the notes already marked with dg-publish, should already be selected.

What do you think? Would that work for your usecase, or did you have something different in mind?

from obsidian-digital-garden.

dclausen01 avatar dclausen01 commented on August 25, 2024

You can use Templater with option to create an empty note with enabled frontmatter.

image

This dies the trick for me, thanks! Now Obsidian + Digital Garden is everything I need for making and presenting stuff to my students 👍

from obsidian-digital-garden.

oleeskild avatar oleeskild commented on August 25, 2024

That's such a cool workflow. Thank you so much for sharing this tip. I wasn't to keen on making a setting where you define a folder that did not have the publish flag, as I think it would be confusing for a lot of users. All published notes should have a flag. This solution fixes that problem.

I hope it's okay that I add this tip in the readme? It needs a bit of cleaning up and I think adding this worfklow would be helpful for a lot of people.

from obsidian-digital-garden.

sharpsteelsoftware avatar sharpsteelsoftware commented on August 25, 2024

Great work on this project @oleeskild ! Do you have any updates on applying dg-publish so we can publish an entire subdirectory of notes with a single property? I am looking for a way to 1. Publish all my notes existing 2. Publish all notes in a subdirectory

from obsidian-digital-garden.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.