Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closes #162 allows a pre-path to be specified in the optimisation/pub… #168

Merged
merged 1 commit into from
Jun 5, 2019

Conversation

tlienart
Copy link
Owner

@tlienart tlienart commented Jun 5, 2019

Following calls are allowed:

  • optimize(...; prepath="testproj")
  • publish(...;prepath="testproj")
  • in config.md @def prepath = "testproj"

All this will result in the same thing (provided optimize and/or publish is used at some point): all paths href="/..." and src="/..." will be prepended with /testproj/.... For instance: https://tlienart.github.io/testproj/

This may not be the most elegant approach but it solves #162, we may revisit this in the future to do something that's more robust.

  • edit: could do with tests and docs

@tlienart tlienart merged commit 244bc79 into master Jun 5, 2019
@danmrc
Copy link

danmrc commented Jun 5, 2019

Small issue: I tried optimize(...; prepath="testproj") and it throws:

ERROR: MethodError: Cannot convert an object of type String to an object of type Pair{K,Tuple{Vararg{DataType,N}}} where N where K
Closest candidates are:
convert(::Type{T}, ::T) where T at essentials.jl:154
Stacktrace:
[1] setindex!(::Dict{String,Pair{K,Tuple{Vararg{DataType,N}}} where N where K}, ::String, ::String) at .\dict.jl:381
[2] #optimize#127(::Bool, ::Bool, ::Bool, ::String, ::Function) at C:\Users\User.julia\packages\JuDoc\4JWQH\src\manager\post_processing.jl:29
[3] (::getfield(JuDoc, Symbol("#kw##optimize")))(::NamedTuple{(:prepath,),Tuple{String}}, ::typeof(optimize)) at .\none:0
[4] top-level scope at none:0

Everything else is working! This include using the @def prepath and the optimize() command in windows

Thank you very much!

@tlienart
Copy link
Owner Author

tlienart commented Jun 6, 2019

Thanks for reporting! the issue you reported is due to a typo on my side, it's fixed.

Glad that the rest works, don't hesitate to open other issues :)

@tlienart tlienart deleted the fix162 branch June 21, 2019 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants