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

Document how users (or template developers) can add static files #140

Closed
choldgraf opened this issue May 16, 2019 · 6 comments · Fixed by #168
Closed

Document how users (or template developers) can add static files #140

choldgraf opened this issue May 16, 2019 · 6 comments · Fixed by #168

Comments

@choldgraf
Copy link
Contributor

It's a bit unclear how custom CSS/JS can be controlled by either users or those who create their own templates. From the command line, it seems like --static provides some way to give a path to a directory w/ these assets, but I'm not sure how to name those files or make sure they actually get loaded by a template.

I think it'd be helpful in the documentation to have:

  1. A guide explaining how to include custom CSS / JS with a template (e.g. if I want a template that links a CSS file in the template file itself how would I do that)
  2. A guide explaining if it's possible, and if so how to use the --static parameter to control the static assets when voila is run
@choldgraf
Copy link
Contributor Author

A ping on this one - I think this will be a common request from folks. Can somebody help me get this into the documentation? If you give a short step/by/step I can try it out and then make a PR

@SylvainCorlay
Copy link
Member

Now that the default template includes a static directory, this may be a good place to start.

@choldgraf
Copy link
Contributor Author

Woot - got a partially distill.pub style template working :-)

image

@SylvainCorlay how do you get the files in https://github.com/QuantStack/voila-gridstack to properly install? Just doing pip install -e won't put them in the proper share/ directory by itself, right?

@SylvainCorlay
Copy link
Member

Just doing pip install -e won't put them in the proper share/ directory by itself, right?

Indeed, you need to actually install it without -e.

Using the -e argument prevents the installation of data files.

@maartenbreddels
Copy link
Member

Yes, although I think we'd want to 'fix' that by having a custom 'develop' cmd class in setup.py. In voila we have a special case that we detect dev mode and also look in the repo dir.
Nice that you are getting some success with the template system, it's on the agenda for next week.

@choldgraf
Copy link
Contributor Author

Cool, thanks for the clarification. I'm trying to see how far I could get w templating, will try to make some docs pushes after we give these sdss talks

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 a pull request may close this issue.

3 participants