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

copy assets folder, do not show src folder to user #42

Merged
merged 5 commits into from
Jul 14, 2020
Merged

Conversation

piever
Copy link
Owner

@piever piever commented Jul 6, 2020

TODO: add docs, for assets folder and autoreload.


inputfile = realpath(abspath(inputfile))
css = realpath(abspath(css))
assets_dir = joinpath(dirname(inputfile), "assets")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be ok to just take inputdir and the inputfule has to be calles index.md / index.jl, and the css has to be called style.css and the assets have to be in assets

Copy link
Owner Author

@piever piever Jul 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, with your trick of using a tempdir, we don't need the src directory for Documenter (it all happens in the temp folder), so a possible structure would be:

presentation/
├── src/
│   └── index.md (or .jl)
│   └── style.css
│   └── assets/
├── build/
│   └── index.html (generated by the package)
│   └── style.css
│   └── assets/

Potentially the user could completely mirror documenter and add a make.jl file with their script (a simple script analogous to yours I guess, activating the Project and building the slideshow).

So this would essentially be a breaking change where the inputfile, outputdir, and css arguments are replaced by a unique input_dir argument. OTOH, I don't think there is a strong reason to make this customizable. This way, Remark can also offer a function that does the reloading (it's enough to watch the folder src).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess when doing this one maybe should think if there are other things wanted that could/should be done.
E.g. should it actually be a directory of stylesheets, all of which would be included?

For that matter, should one be allowed multiple markdown files that would be concatenated in lexigraphical order during processing?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I've never needed multiple markdown files, and I'm afraid it could get a bit confusing.

OTOH, I often need two stylesheets, one is basically a customized Remark theme, and the other is for layouting (a bunch of flex containers essentially). Maybe the simplest rule is that if there is a file called style.css, use that one, if not, see if there is a folder style/ and use all css in there, otherwise, use default css.

@piever
Copy link
Owner Author

piever commented Jul 8, 2020

Should be good to go. Only thing that I'm wondering about, is it OK to release a breaking change before the juliacon deadline or does it risk to bother people who are using this right now and will have to figure out the update?

using Remark, FileWatching

while true
Remark.slideshow(@__DIR__; options = Dict("ratio" => "16:9"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe include the title setting in this example since i imagine it is going to be nearly universally used

@oxinabox
Copy link
Contributor

Should be good to go. Only thing that I'm wondering about, is it OK to release a breaking change before the juliacon deadline or does it risk to bother people who are using this right now and will have to figure out the update?

People submitting juliacon talk are smart people who know how to use the package mangage

@piever piever merged commit 84efaa2 into master Jul 14, 2020
@piever piever deleted the pv/assets branch July 14, 2020 16:46
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.

None yet

2 participants