Open-Scholarship-Strategy / site

Website for the Open Scholarship Strategy
https://open-scholarship-strategy.github.io/site/
GNU General Public License v3.0
21 stars 20 forks source link

Better visualiation of the site #8

Closed Protohedgehog closed 5 years ago

Protohedgehog commented 6 years ago

Does anyone know of a better way to visualise the content? It's a bit of a long static page at the moment. Just something like having the table of contents stuck to the sidebar might be useful.

tosteiner commented 6 years ago

uhm, site is running on GitHub Pages, right? They've got a variety of themes available, see e.g. (w. sidebar):

Protohedgehog commented 6 years ago

Oooh, legendary! Thanks Tobias, let's go with dinky and see what happens.

tosteiner commented 6 years ago

or (more advanced): https://mmistakes.github.io/minimal-mistakes/docs/quick-start-guide/#github-pages-method

Protohedgehog commented 6 years ago

Thanks for your help on this! OK, I just tried to edit the _site.yml to use the dinky theme and broke the website.

Getting the error: Error in navbarHeights[[theme]] : subscript out of bounds

Any idea on how to get past that?

tosteiner commented 6 years ago

hm, good question... not exactly sure... you're compiling your text with R, right? There might be some translation issues between R, pandoc and the markdown handler in GitHub, but that's just a (semi-)educated guess based on this here - so maybe just try the other theme, Minimal? (sorry, not much help, though 😊 )

Protohedgehog commented 6 years ago

Yep, I'm trying to do all of this in R Studio. Minimal doesn't seem to work either, same error. Reverting back to flatly for now.. Hmmm.

tosteiner commented 6 years ago

maybe you want to check this one here: https://github.com/rstudio/rmarkdown/issues/1189 - in short, this comes down to an update of rmarkdown to v1.8 or later (in case you want to try that)

Protohedgehog commented 6 years ago

OK, I had 1.9 installed, but upgrading to 1.10 now.. Let's see! :)

tosteiner commented 6 years ago

sounds good :) but yeah, in general, I guess someone with deeper knowledge of git would be more helpful than me, I guess... I do know the basics, but am quickly lost when it comes to looking under the hood

Protohedgehog commented 6 years ago

OK, that didn't work, sadly. I thought it did for a second but was mistaken. @danielskatz any idea on this stuff?

Protohedgehog commented 6 years ago

I think I need to have a config.yml file that might help with some of these things. Will investigate.

tosteiner commented 6 years ago

👍 sounds reasonable, yes - see https://github.com/pages-themes/dinky/blob/master/README.md for more

danielskatz commented 6 years ago

Sorry, this isn't one of the things I have lot of experience with

zuphilip commented 6 years ago

There is a Jekyll plugin for the TOC you might want to look closer into: https://github.com/dafi/jekyll-toc-generator. However, it seems that you then need to overwrite some of the files locally. Because I have only seen in the one pre-defined theme a TOC: https://pages-themes.github.io/leap-day/

tosteiner commented 6 years ago

@Protohedgehog playing around with github page themes, I managed to apply basic, out-of-the-box styling - this is the Architect theme at my fork at https://tosteiner.github.io/site/

Protohedgehog commented 6 years ago

Awesome, I got the pull request here: https://github.com/Open-Scholarship-Strategy/site/pull/14

Will have to work on this tomorrow, as it looks like there are a few conflicts. Thanks again! :)

jaranta commented 6 years ago

Just a heads up: you can only use a couple of pre-approved Jekyll plugins if you host your site on Github Pages (jekyll-toc-generator warns about this). You can pretty easily build this with just Liquid, though. I have some experience playing around with Jekyll, so I can help with this if you have some specific things in mind.

Protohedgehog commented 6 years ago

Hi @jaranta, thanks for this helpful comment! Should have figured things were limited.

If you know how though, the sort of thing I think we're after is like here: https://open-science-training-handbook.gitbook.io/book/introduction with the table of contents as a static item in the sidebar as you scroll through the document. Is something like that possible..? :)

jaranta commented 6 years ago

Yes it is! You just have to create the TOC when creating the document and then do some CSS trickery to push it to either side of the document. Shouldn't be even that hard. You could get it to highlight the relevant section in the TOC with some more trickery, but that's probably beyond me.

Caveat: I'm not an expert in any of this, but I'd be happy to tackle the challenge. I can try it locally and push a working version as soon as I have one, if you're not in a hurry.

Protohedgehog commented 6 years ago

Aha, I see, thanks! The highlighting thing would be cool too, if possible.

I'm looking at posts like here https://github.com/dafi/jekyll-toc-generator and here https://kramdown.gettalong.org/converter/html.html#toc for now, but it seems like some extra files and stuff are needed that we don't have yet. Please do feel free to take a whack at it if you find the time - no rush at all! :)

dannycolin commented 6 years ago

@Protohedgehog There's an other solution I can think of. You could have two branches. One for the source code of the jekyll website and an other for the _site folder. You'll need to configure the repository so it looks to the branch containing the _site folder instead of the one containing the source.

I can create a test repository during the weekend because I don't remember all the steps in detail. If it still works I'll let you know ;).

borisalmonacid commented 6 years ago

I used the sphinx-doc for generated a different extension using markdown files.

The output with sphinx are:

You can check the examples in this url Sphinx Examples Do you need something like that to generate different outputs?

rtleyb commented 6 years ago

Yep but the problem was with the jupyter notebook file :(

__ Laboratorio de Métodos I3S // Facultad de Ciencias de la Salud Universidad Central de Chile Of: (+56)226661609 ORCID: 0000-0001-5058-9309

El 03-08-2018, a la(s) 15:13, borisalmonacid notifications@github.com escribió:

I used the sphinx-doc for generated a different extension using markdown files.

The output with sphinx are:

HTML (including Windows HTML Help) LaTeX (for printable PDF versions) ePub Texinfo manual pages plain text You can check the examples in this url Sphinx Examples Do you need something like that to generate different outputs?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

borisalmonacid commented 6 years ago

@ametodico this problem is solved with -> https://help.github.com/articles/working-with-jupyter-notebook-files-on-github/

Protohedgehog commented 6 years ago

@dannycolin If you get the chance to give that a stab, I'd deeply appreciate it!

@borisalmonacid - most of these formats exist already here: https://zenodo.org/record/1323437#.W2e2lij7RPY - do you think more types need to be added for the next release?

Also, this viewer thing looks mint. Lemme see if I can add a fix for that, thanks!

tosteiner commented 5 years ago

this does kind of feed into this here - #44

cMadan commented 5 years ago

I think #44 sorted all this out?

Protohedgehog commented 5 years ago

Yes, thanks @cMadan! Great work, everyone :)