Git Product home page Git Product logo

Comments (11)

pmjones avatar pmjones commented on August 10, 2024

/me nods

Given config file and option flag, which do you think should take precedence? (I'd say option flag.)

from bookdown.bookdown.

weierophinney avatar weierophinney commented on August 10, 2024

Definitely option flag; that's the most specific, as it's specified at time
of invocation.
On Jun 13, 2015 1:50 PM, "Paul M. Jones" [email protected] wrote:

/me nods

Given config file and option flag, which do you think should take
precedence? (I'd say option flag.)


Reply to this email directly or view it on GitHub
#11 (comment)
.

from bookdown.bookdown.

pmjones avatar pmjones commented on August 10, 2024

Agreed. Let me see what I can do. (Additionally, if you have time and inclination to work up a PR, I'll review it.)

from bookdown.bookdown.

pmjones avatar pmjones commented on August 10, 2024

This should be fixed; try the dev-develop branch and let me know how it goes for you.

from bookdown.bookdown.

pmjones avatar pmjones commented on August 10, 2024

Nope, not yet -- sorry for the noise.

from bookdown.bookdown.

pmjones avatar pmjones commented on August 10, 2024

@weierophinney OK, now try dev-develop. You should be able override with --template= and/or --target= at will.

from bookdown.bookdown.

weierophinney avatar weierophinney commented on August 10, 2024

I can confirm it works... but there's one oddity. :)

So, I have a directory structure that has the following:

documentation/
    doc/
        templates/
a-component/
    doc/
        bookdown.json
        book/

Inside of a-component/, I invoked bookdown with the following:

$ bookdown --template=../documentation/doc/templates/main.php doc/bookdown.json

This failed; it could not find the template:

Cannot find template 'doc/../documentation/doc/templates/main.php'.

In other words, it was resolving the relative path relative to the bookdown.json, not where bookdown was actually invoked.

I would expect it to resolve the path based on where the script was invoked. This would require resolving path arguments prior to parsing the bookdown.json, probably.

(When I re-ran and specified the path relative to the bookdown.json, it worked perfectly.)

from bookdown.bookdown.

pmjones avatar pmjones commented on August 10, 2024

Mmm, I can guess what the problem is. I'll take a look.

from bookdown.bookdown.

pmjones avatar pmjones commented on August 10, 2024

OK @weierophinney give it another go. The relevant commit is dee1f42 and takes away the code to "fix" the path to make it relative to the bookdown.json file.

from bookdown.bookdown.

weierophinney avatar weierophinney commented on August 10, 2024

Works perfectly, @pmjones ! 🚢 !!!

from bookdown.bookdown.

pmjones avatar pmjones commented on August 10, 2024

Finally. Sorry for the hassle, and thanks for your patience. New release forthcoming as a result!

from bookdown.bookdown.

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.