Post

Using RETYPE for setting up my courses

Found *reType* as a SSG for documentation sites. Decided to use it in ChromeOS, frustration ensued.

Using RETYPE for setting up my courses

Teacher on summer break seeks project (aka the Intro)

It’s the summer break, thank goodness for that. And while it is my firm belief that every teacher earns every second of their summer holiday after the 10 months that preceded it, it is also a time where most teachers do actually do a bit of work for the coming year. I do anyway.

You develop projects that you want to put in place for the coming year (more on that in a later post), it’s when you update your coursenotes, and make new ones if you have a new class.

What about me you ask? Well let me tell you ! Python. It’s a few years ( a couple if one’s being serious ) where i’m trying my best to integrate Python more into what i do with my highschoolers. It’s not easy, if for no other reason that there is simply no time! No class time that is. Already it is nearly impossible to finish the actual official programme with the pittance of time we are allocated (all the less with the early highschool/lycée years), let alone to take from that time to actual get into a bit of Python, for barely anything more than simple calcuations, equation-solving and graphic visualisation and modelling.

A second obstacle is the absolute illiteracy of most of these kids in programming. Maybe it’s a problem specific to France, but i highly doubt it. So it’s all the more difficult to get any proper programming done of worth when you combine the two problems. They’re pretty bad at actually searching and learnign on their own too, and anyways they have way too much schoolwork to do. All that to say that i’ve been slowly writing up my own coursenotes for the sort of basic stuff they need to do that i hope they can use as reference and training, since if it’s going to be worth anything it’d have to have a lot of practice exercises.

Search for an online plaform

MarkDown has become more and more my reference for most writing, though my actual coursenotes are in $\LaTeX$. I can’t give them Python coursenotes in LaTeX since for one thing they’re more and more online for everything they do school-related and for another I want them to be doing this while codign in an IDE IDEally (see what i did there?).

At first i settled for the most easy and frankly practical solution that required aboslutely nothing more : github. Yea, just keeping it all on github as not just a repo for the note but even as the platoforme for reading it online.

But then i got bored, and convinced myself that i need something more fancy, like a documentation site, pretty to navigate and whatnot. (Please, no comments on having way too much time on my hand).

One solution i came up that frankly was pretty good : Gitbook . There is absolutely nothing wrong with it! I was happy. But much like those relationships that are perfect fine you can’t help notice little things that might bother disproportionately to their impact.

Being cheap i didnt want to pay for anything, and GitBook has a perfectly fine free option. I did find it somewhat limited in what you can customise. The one real complaint i did have with GB was that it felt rather slow and the site was a memory gobbler whenever i was workign on it. So the search continued.

Enter reType

I looked through a lot of the resources only that use Jekyll, and didnt find what i was seeking despite the great expanse of themes available.

And by complete chance i fell upon reType … and it just fit.

From the purely aesthetic aspects, to the customisability, to the simplicity of installation/use for an idiot like myself, it just fit.

On Windows it’s quite straightforward. Like most of these Static Site Generators there’s a fairly simple command line installation. You Node.js since reType is install via npm but even yours truly is capable of working that out. Especially since it’s only required to install retype, which is required only when you want to run yoru site locally and when you want to build it for deployment. The rest of the time you’re in your prefered choice for a editing text, though somethign liek VSCode is perfectly adapted given that you can run the server from its terminal.

But … ChromeOS … problems

So yea I’ve been using a Chromebook as my mobile drive, when away from my big PC and have generally been more that happy with it, good autonomy, cheap and frankly since Linux is availabe on it, never feeling the need for more .. until recently (the other reason has nothign to do with this).

This is where i’ve been less than satisfied with Chromebooks, web dev stuff and generally when it comes to anythign more than the most basic Linux.

So I just want to show how i’ve managed to get things working for me. Since i did end up having to do a fair bit snooping around the web to finally make things work.

Here are the two main problems I’ve faced within the Linux environment of my chromebooks :

  • :firecracker: My linux environment forgetting that i have installed something when i log out and then come back. This has happened with Ruby a few times which is necessary to run Jekyll, and it happened with Nodejs and npm when trying to install reType.
  • :firecracker: npm unable to install apps globally which required to install the reType app itself.

Solution : Here is what worked for me

In order to get Nodejs and npm to install, once you’re inside your terminal type this :

1
2
3
sudo apt-get install curl gnupg -y
curl -sl https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs

I put setup_22.x for the simple reason that this was the latest version available at the time of this;

You can make sure the installation has worked with :

1
2
npm -v
nodejs -v

At this point you can use npm to install using :

1
npm install retypeapp --global

but on my chromebook this worked once but failed after, telling me a bunch of errors basically reducing to not having access to some directories.

The solution was to use sudo :

1
sudo npm install -g retypeapp

And there it is. You can verify with a simply version check if reType has been isntalled or not :

1
retype -v

I wont go into how to use reType to get a site up and runnign since you can find any number of such guides on the internet.

Voilà. Given how i had to run aroudn to find a solution, i hope if you run into this same problem, that this might help.

Featured Photo Silhouette of a fire jumper, Charshanbehsoori 2015, Paris, France || f/3.5 || 1/4s || ISO1600 || 18 mm || Nikon D7000 || 2015 || Shahriar Zayyani

This post is licensed under CC BY 4.0 by the author.