Closed biancapallaro closed 3 years ago
As I understand, We can't have locally existing files show up on the internet. They have to exist on some server on the internet. So, I think if it were possible to have even the HTML files located in our Google Drives (not as gdocs
but html
) but still connected to bottlejack in a way that if you insert the drive link in yaml
it processes it as an HTML file.
It should pull the 'title' for the yaml
from an <h1>
tag and 'slug' (which makes the URL for the article) from the <title>
tag within the
I don't think local files would be a problem! I think we just need someone to lay out what the yaml might look like for adding an html file as a page. We'll just have bottlejack take that HTML and turn it into a "real" page just like it does with the google docs.
I'm open to automatically pulling title/slug from the html file itself, but am wondering about the tradeoff between the flexibility of specifying it in the yaml vs. the ease-of-use of making it pull from the html. If anyone else has thoughts I'm open to hearing them!
"Where would the HTML files live? Can they be anywhere on my computer? In a specific folder?"
As far this goes, I think it should be in the same directory as .hbs and .yaml files?
As far this goes, I think it should be in the same directory as .hbs and .yaml files?
Sure! Makes more sense than anywhere else on your comp, I guess. Can someone hit me with an example of what the yaml would look like, based on the gdoc version above?
Something like this maybe?
type: html/ipynb
title: this is the first project
slug: first-project
url: file-path
I was thinking of just having the type
be HTML and plugging it right into an html.hbs
, but your type: html/ipynb
makes me think: maybe not all HTML pages should be the same! Since you might have some HTML that's from a notebook, some HTML from a scrollytelling piece, some HTML that's from something else, maybe there should be the option for them to get different templates. I might move that into a template:
variable, though.
Let me throw something together and we'll see how well it works!
Give it a try, although there are a few changes you'll need to make to your content:
page.hbs
is renamed to gdoc.hbs
html.hbs
is the default for type: html
template
to override the default (for default, setting the type
sets the .hbs
file with the same name as the template)data.yaml
for other changesI'll upload a new example.zip
on Slack, or you can look in the example folder to see the new templates. Also, might need to npm install -g bottlejack@0.0.2
Seems like it could be useful, but how do you want to use HTML?
It might be useful to start from thinking about how we could adjust the
gdoc
type, which currently looks like this:Some questions for this proposal might be:
pages
yaml look like for an HTML file?It's probably useful to think about it in connection to #1 , too. Should they operate the same way?