Git Product home page Git Product logo

Comments (5)

blurgyy avatar blurgyy commented on July 17, 2024 2

Thanks for your great work and the well-explanation on the "Hands-on Guide" section.

This project deserves more stars.

Thanks for the kind words, they mean a lot to me!

the website itself is very well built, may I ask if there's any templates that u used or u built it from scratch?

The documentation website is built with VitePress, using a theme modified from Vuejs' blog, you can inspect its sources at the docs branch.

A little reminder, some doc might needs some updates. For example, it's now base rather than basedir, but the "Hands-on Guide" still shows basedir in the examples.

I have now updated the docs, thanks again for the heads up!

from dt.

blurgyy avatar blurgyy commented on July 17, 2024 1

Hi @CharlesChiuGit,

Thank you for opening an issue!

dt-cli supports this with a config option renderable which defaults to true. To avoid rendering a source file, you can add renderable = false for the group that you want to to skip template rendering, or add the renderable = false line under [global] to disable templating globally. This has been mentioned in the documentation here. E.g.

# this is a config file for dt-cli
[global]
# renderable = false  # globally disables templating

[[local]]
name = "lf"
base = "/some/path"
sources = [ "lfrc", "and", "some", "other", "files" ]
target = "/some/other/path"
# renderable = false  # disables templating only for this group

Another solution (more of a workaround) is to escape the handlebars inside the source file itself by adding a backslash before the opening "handlebar". With this workaround, dt-cli's config file does not need to be modified. E.g.:

-cmd open ${{
+cmd open $\{{
     test -L $f && f=$(readlink -f $f)
     case $(file --mime-type $f -b) in
         text/*) $EDITOR $fx;;
         *) for f in $fx; do setsid $OPENER $f > /dev/null 2> /dev/null & done;;
     esac
 }}

I recommend you to refer to the Key References section in the documentation while creating a config file for dt-cli, but feel free to let me know if any problem arises.

Cheers!

from dt.

CharlesChiuGit avatar CharlesChiuGit commented on July 17, 2024

aha, I didn't notice there's a "Guide" and "Key References" section on the website. Since "Hands-on Guide" covers 90% of my use case, so I didn't bother to find other docs lmao, my bad. (But I also think it's would be a bit better to mention there's a more thorough doc in the "Hands-on Guide" section.

Thanks for your great work and the well-explanation on the "Hands-on Guide" section. (And the website itself is very well built, may I ask if there's any templates that u used or u built it from scratch?

This project deserves more stars.

I'll let u know how thing goes afterwards!

from dt.

CharlesChiuGit avatar CharlesChiuGit commented on July 17, 2024

A little reminder, some doc might needs some updates. For example, it's now base rather than basedir, but the "Hands-on Guide" still shows basedir in the examples.
image

from dt.

CharlesChiuGit avatar CharlesChiuGit commented on July 17, 2024

Adding renderable = false did fix the issue. tks!

from dt.

Related Issues (2)

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.