Yes. Here is a web demo.
npm install -g scroll-cli
View the releaseNotes.
Scroll is built for developers who like writing, tools for thoughts, open source, git backed static site generators, and fast simple code.
Scroll is not just another static site generator but also a new language. A new language that you can extend.
The basics of Scroll are even simpler than Markdown. For example, the keyword for title is title.
You can stick to the basics or easily define new keywords extending the language to better fit your content and workflows. A simple indent is all you need to include sub-languages. No complex encoding needed.
Scroll evolved based on the theory that instead of one language for writing it would be better to get to choose from an ever evolving ecosystem of thousands of mini-languages, and mix and match them to better fit your domain.
So, compared to other languages, Scroll is designed to be easy to extend.
You can see this in the Scroll source code. Scroll is primarily written in Grammar, and there are currently dozens of
.grammar files in the base distribution. Each Grammar file can define a mini language of its own. You can simply add (or remove) Grammar files to generate your own custom dialects to better fit your domains.
Think of it as one file, many languages.
Altering traditional languages in this fashion would lead to chaos, but Scroll does it in a stable and scalable way by making the most of the indent trick (also known as the off-side rule). Each line gets its own scope. So you can add, remove, and update your mini-languages and their associated blocks without breaking the rest of the documents.
Imagine you run a cooking blog where you share recipes. It may be useful to present recipes to your readers in a specialized style. You could create a recipe keyword and write a post like this:
title My Snowball Cookies
* Bet you can't eat just one!
6 large eggs
1/2 cup sugar
step Beat eggs until foamy
step Add sugar
step Heat oven to 350 degrees
step Bake for 10 minutes
Notice that your post uses the keyword
recipe, but Scroll does not have a keyword for that. No problem, just define it yourself using Grammar, extending your dialect of Scroll:
const addYourSpecialMagic = ""
Your extension might generate beautiful custom HTML for that recipe section and also perhaps allow users to vote on it, or include it in a CSV export, et cetera. Scroll let's you combine mini-languages in a simple and non-conflicting way. What you do with those languages is up to you.
For an extended example of extending Scroll check out this one which adds node types for Markdown, Textile, and BBCode.
Compared to Markdown there is very little tooling and the ecosystem is currently very small.
The instant way is to try Scroll in GitPod.
Scroll is a command line app you install on your local machine. Scroll requires basic familiarity with the command line and NodeJs >=14. If you do not have NodeJs, Mac/Linux users can install NodeJs with n and Windows users can install NodeJs with Scoop.
If you would like to use Scroll but aren't familiar with the command line, please open an issue and we may be able to help.
Once you have NodeJs installed you can install from GitHub or npm. Scroll is scroll-cli on npm.
You can install from GitHub:
git clone https://github.com/breck7/scroll
npm install -g .
Or you can install Scroll with npm by typing:
npm install -g scroll-cli
Scroll is a command line app. To see the commands type:
Post an issue in this GitHub or email us.
A typical Scroll project folder, excluding the files built by Scroll, looks like this:
When you run
scroll build, Scroll reads those files and generates the outputs right in that site's folder.
With Scroll your site's Scroll files and static files and generated html are all in one public folder and checked into version control. Usually you want to add
feed.xml to your
Have a drafts folder next to your published scroll. For example:
Scroll articles are written as Scroll files with the file extension
scroll. The current base grammar for Scroll is defined here.
Scroll is designed for git. A single article is stored as a single file tracked by git.
Yes! Scroll is also 100% focused on helping people build internal or public domain sites and everything is designed with that assumption.
The default Scroll theme is designed to make it easier for syntopic reading. Being able to scan the page like a newspaper. This allows you to read at a higher level—to "get in the author's head"—compared to reading one article at a time from beginning to end.
And if anyone prefers to read a scroll in a different way—they can! Scroll is for public domain sites. People are free to arrange the symbols any way they wish.
This was originally a bug. But then it turns out to be a feature, as it gives older articles, which are often more important, more visibility.
Yes. In the Tree Language Designer.
scroll list | scroll build
Go to your project folder and create the file below:
mkdir -p .github/workflows
Then open that file and paste in this code:
# Adapted from https://github.com/JamesIves/github-pages-deploy-action
name: Build and Deploy Scroll
- name: Checkout 🛎️
- name: Install and Build
npm install -g scroll-cli
# The line below is needed if you have *.html in your gitignore file
- name: Deploy 🚀
branch: scroll-output # The branch the action should deploy to.
Commit and push. Now go to your GitHub Repo and then
Pages, and select the
scroll-output branch as the Source for the pages. Click save. Your built site should be live.
GitHub has instructions but is really is as simple as this:
Scroll does not check for broken links. For that, try linkinator.
# npm install -g linkinator
linkinator https://scroll.pub > brokenLinks.txt
Scroll does not have browser perf tools built in. For that, try lighthouse.
# npm install -g lighthouse
lighthouse https://scroll.pub --output-path scrollBrowserPerf.html; open scrollBrowserPerf.html
Any web server works. You can even host your scroll for free using GitHub Pages, just like this site.
Just buy a domain and point it to your web server or web host (such as GitHub Pages). Google Domains is where this domain is registered and is a great service.
If you have your own web server try rsync. Here's a bash one liner:
# swap "/var/www/html" with the path to your website's location on your web server
rsync -vr /[path/to/your/site]/* [yourdomain.com]:/var/www/html
Add a section like the one below to your ~.ssh/config to save your username and correct key pair.
Pandoc is one way to do it. If you are on a Mac and have Homebrew installed:
brew install pandoc
pandoc index.html -o book.epub
Scroll does not come with hot reloading but you can easily set it up with
sudo npm install -g nodemon. Then run:
nodemon -e scroll -x "scroll build"
Or alias it:
alias watch="nodemon -e scroll -x 'scroll build'"
You can also add the following code to the page(s) you are working on to have them reload without manually refreshing the browser:
html <meta http-equiv="refresh" content="1;">
# apt-get install goaccess
goaccess /var/log/nginx/access.log -o /var/www/html/YOUR_SECRET_REPORT_URL.html --log-format=COMBINED --real-time-html --ws-url=wss://YOURDOMAIN.com
Yes! Just create a
feed.scroll file like this.
Yes! Just add your page to a category by using the
groups keyword and then creating a
yourGroupName.scroll page for the group. See a demo here.
Yes. By default the first image and first paragraph of an article will be used for the "og:" tags. Unfortunately Twitter doesn't support relative image links so you need to specify
baseUrl. For more help check out the debuggers from Facebook and Twitter.
Yes! Scroll includes a simple API for changing the style of your site. This is an active area of development so please reach out if you'd like to customize the look of your Scroll.
Hopefully someone will build a package or site that does this. For now, on your Twitter settings, download an archive of your data and convert the tweets JSON into scroll files. Or to experiment faster use this tool to grab some tweets as a TSV.
File issues. Share your Scroll sites.
You can submit pull requests too. The shorter the better.
# cd your_slow_scroll
# you may need to update the path below so it points to your scroll code
node --cpu-prof --cpu-prof-name=scrollNodePerf.cpuprofile ~/scroll/scroll.js build
# Now ➡️ open a new Chrome tab ➡️ open devtools ➡️ click Performance ➡️ click "Load Profile..." ➡️ select your scrollNodePerf.cpuprofile
Scroll and Web Components are similar in that both empower users to define their own reusable components. But Scroll is higher level than web components. For example, in addition to easily targeting HTML and web components, Scroll also plays really nicely with version control and 2D editors. Scroll encourages encoding semantic content with as little noise as possible, which creates benefits in many places.
For that we use BrowserStack.
The scroll was invented thousands of years ago and scrolls are still useful today. Scroll has been designed with a focus on simplicity and a goal of making something that would have been useful decades ago, with the hope that this will make it useful decades into the future.