JuliaBooks / Books.jl

Create books with Julia
https://huijzer.xyz/Books.jl/
Other
270 stars 18 forks source link

Always use `is_ci()` instead of `IS_CI`? #245

Closed findmyway closed 2 years ago

findmyway commented 2 years ago

I find that IS_CI is defined as a constant in this package:

https://github.com/JuliaBooks/Books.jl/blob/93376d98db5de7425bddd2659f07685d6a90f84a/src/ci.jl#L1-L2

I'm afraid this is not the standard way to do so.

The IS_CI is defined as a const, which means it will be precompiled and will never be changed later. The direct result is that users can not modify it by setting the CI environment variable to test the local building pipeline.

I'd recommend using is_ci() instead of IS_CI throughout this package.


I suspect this is the root cause of the incorrect rendering of https://cn.julialang.org/JuliaDataScience/ . (The online_url_prefix is added but it doesn't take into effect)

rikhuijzer commented 2 years ago

I suspect this is the root cause of the incorrect rendering of https://cn.julialang.org/JuliaDataScience/ . (The online_url_prefix is added but it doesn't take into effect)

The issue is actually #241. It's fixed in main, but I didn't tag it yet. I'll tag a new Books version now.

rikhuijzer commented 2 years ago
findmyway commented 2 years ago

Thanks!