• Stars
    star
    441
  • Rank 98,861 (Top 2 %)
  • Language
    JavaScript
  • License
    Other
  • Created about 5 years ago
  • Updated 26 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Scroll is a language for scientists of all ages. Scroll includes a command line app that builds static blogs, websites, CSVs, text files, and more.
import header.scroll
title ๐Ÿ“œ Scroll: tools for thoughts.

# An extensible alternative to Markdown

<br>
startColumns
import ciBadges.scroll

? Can you show me a screenshot?
image blog/screenshot.png

? Can I try Scroll in the browser?
Yes. Here is a web demo.
 https://try.scroll.pub/ web demo

? How do I install Scroll?
code
 npm install -g scroll-cli

? What has changed in recent versions?
View the releaseNotes.
 link releaseNotes.html releaseNotes

? Is there a tutorial?
Yes.
 link tutorial.html

? Is there an official blog for the project?
Yes.
 link blog/ Yes

? Where is the NPM package?
Here.
 https://www.npmjs.com/package/scroll-cli

? Do you offer full service Scroll website hosting?
Sure!
 https://buy.stripe.com/eVabMubeV62xdiMfZ4

? Do you offer custom theme and extension development?
Sure!
 https://buy.stripe.com/3csaIqaaRez3emQ149

? Who is Scroll for?
Scroll is built for developers who like writing, tools for thoughts, open source, git backed static site generators, and fast simple code.

? What makes Scroll different?
Scroll is not just another static site generator but also a *new language*. A new language that you can _extend_.
 https://staticsitegenerators.net another static site generator
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 is written in a language called GrammarLinked, and both Grammar and Scroll are built on the new syntax called TreeNotationLinked.

? How does Scroll improve over the latest incarnations of Markdown?
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 GrammarLinked, 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.
 https://en.wikipedia.org/wiki/Off-side_rule off-side rule

? How do I extend Scroll?
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:
 italics recipe
code
 title My Snowball Cookies
 
 * Bet you can't eat just one!
 
 recipe
  ingredients
   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 GrammarLinked, extending your dialect of Scroll:
code
 recipeParser
  extends abstractScrollParser
  crux recipe
  javascript
   compile() {
     const addYourSpecialMagic = ""
     return `<div>${addYourSpecialMagic}</div>`
   }
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.
 https://scroll.pub/blog/indented-heredocs.html one

? What is the biggest downside to Scroll?
Compared to Markdown there is very little tooling and the ecosystem is currently very small.
Also, although it is simple to write GrammarLinked when you know what you're doing, documentation for GrammarLinked is still poor and tooling isn't great yet.

? What kind of sites can I use Scroll to build?
Scroll is a great solution for blogs and sites of one page, a few pages, tens of pages, hundreds of pages, or even thousands of pages.
 https://scroll.pub one page
 https://scroll.pub/blog/ a few pages
 https://breckyunits.com/code/ tens of pages
 https://breckyunits.com/ hundreds of pages
 https://pldb.com/ thousands of pages

? How do I get Scroll?
The instant way is to try Scroll in GitPod.
 https://gitpod.io/#https://github.com/breck7/scroll 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.
 https://nodejs.org NodeJs
 wrap # https://github.com/tj/n
 https://scoop.sh/ 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.
 https://www.npmjs.com/package/scroll-cli scroll-cli
You can install from GitHub:
code
 git clone https://github.com/breck7/scroll
 cd scroll
 npm install -g .
Or you can install Scroll with npm by typing:
code
 npm install -g scroll-cli

? How do I use Scroll?
Scroll is a command line app. To see the commands type:
code
 scroll help

? Where do I get help?
Post an issue in this GitHub or email us.
 email [email protected] us

? What are some example sites using Scroll?
Scroll currently powers blog and sites of one page, a few pages, tens of pages, hundreds of pages, and even thousands of pages.
 https://scroll.pub one page
 https://scroll.pub/blog/ a few pages
 https://breckyunits.com/code/ tens of pages
 https://breckyunits.com/ hundreds of pages
 https://pldb.com/ thousands of pages

? What does a typical project folder look like?
A typical Scroll project folder, excluding the files built by Scroll, looks like this:
code
 ๐Ÿ“yourDomainName.org
  about.scroll
  firstPost.scroll
  index.scroll
  header.scroll
  footer.scroll
  anImageInTheArticle.png 
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 `*.html` and `feed.xml` to your `.gitignore`.

? How do I save drafts?
Have a drafts folder next to your published scroll. For example:
code
 ๐Ÿ“drafts
  someDraft.scroll
 ๐Ÿ“yourDomainName.org
  publishedArticle.scroll

? What file formats does Scroll use?
Scroll articles are written as Scroll files with the file extension scroll. The current base grammar for Scroll is defined here.
 code scroll
 https://github.com/breck7/scroll/tree/main/grammar here

? What language is Scroll written in?
Scroll is mostly written in GrammarLinked. The Scroll CLI app is written in plain Javascript and runs in Node.js. Scroll makes heavy use of Tree Languages. The CSS for the default theme _Gazette_ is written in Hakon. The HTML is written in stump.
 https://jtree.treenotation.org/designer/#standard%20hakon Hakon
 https://jtree.treenotation.org/designer/#standard%20stump stump
TypeScript is not used in the Scroll repo and because the Javascript is only ~1kloc that likely will not be necessary.

? How does versioning of articles work?
Scroll is designed for git. A single article is stored as a single file tracked by git.

? Is Scroll public domain?
Yes! Scroll is also 100% focused on helping people build internal or *public domain sites* and everything is designed with that assumption.

? Why does the default theme have a single page layout?
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.
 https://fs.blog/how-to-read-a-book syntopic reading
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.

? Will you make design decisions for non-public domain sites?
No.

? Can I use Scroll for internal private sites not intended for publishing?
Yes!

? In the single page layout why don't you have only the newest articles above the fold?
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.

? Is there a place I can play with the Scroll grammar?
Yes. In the Tree Language Designer.
 https://jtree.treenotation.org/designer#url%20https%3A%2F%2Ftry.scroll.pub%2Fscroll.grammar Tree Language Designer

? How do I recursively build multiple scrolls in child folders?
code
 scroll list | scroll build

? What's an easy way to have GitHub run Scroll and build my HTML files automatically?
Go to your project folder and create the file below:
code
 mkdir -p .github/workflows
 touch .github/workflows/buildAndDeployScroll.yaml
Then open that file and paste in this code:
code
 # Adapted from https://github.com/JamesIves/github-pages-deploy-action
 name: Build and Deploy Scroll
 on:
   push:
     branches:
       - main
 jobs:
   build-and-deploy:
     runs-on: ubuntu-latest
     steps:
       - name: Checkout ๐Ÿ›Ž๏ธ
         uses: actions/[email protected]
       - name: Install and Build
         run: |
           npm install -g scroll-cli
           scroll build
           # The line below is needed if you have *.html in your gitignore file
           rm .gitignore
       - name: Deploy ๐Ÿš€
         uses: JamesIves/[email protected]
         with:
           branch: scroll-output # The branch the action should deploy to.
           folder: .
Commit and push. Now go to your GitHub Repo and then Settings, then Pages, and select the scroll-output branch as the Source for the pages. Click save. Your built site should be live.
 code Settings
 code Pages
 code scroll-output

? How do I setup a custom 404 page with GitHub pages?
GitHub has instructions but is really is as simple as this:
 https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site instructions
scrollCode
 permalink 404.html

? How do I check for broken links?
Scroll does not check for broken links. For that, try linkinator.
 https://github.com/JustinBeckwith/linkinator linkinator
code
 # npm install -g linkinator
 linkinator https://scroll.pub > brokenLinks.txt

? How do I check browser performance?
Scroll does not have browser perf tools built in. For that, try lighthouse.
 https://github.com/GoogleChrome/lighthouse lighthouse
code
 # npm install -g lighthouse
 lighthouse https://scroll.pub --output-path scrollBrowserPerf.html; open scrollBrowserPerf.html

? Where should I host my site?
Any web server works. You can even host your scroll for free using GitHub Pages, just like this site.
 https://pages.github.com GitHub Pages

? How do I use Scroll with a custom domain?
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.
 https://domains.google Google Domains

? How can I deploy my site?
If you have your own web server try rsync. Here's a bash one liner:
code
 # deploy.sh
 # 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.
 https://unix.stackexchange.com/questions/494483/specifying-an-identityfile-with-ssh section
code
 Host example.com
   User yourUserName
   IdentityFile ~/.ssh/example_id_rsa
   IdentitiesOnly yes

? How can I output my Scroll to an EPUB file?
Pandoc is one way to do it. If you are on a Mac and have Homebrew installed:
 https://brew.sh Homebrew
code
 brew install pandoc
 pandoc index.html -o book.epub

? How can I do hot reloading?
Scroll does not come with hot reloading but you can easily set it up with `nodemon`. Install `nodemon` with `sudo npm install -g nodemon`. Then run:
bashCode
 nodemon -e scroll -x "scroll build"
Or alias it:
bashCode
 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:
scrollCode
 html <meta http-equiv="refresh" content="1;">

? How can I track web traffic?
Scroll emits HTML with zero Javascript and does not have any tracking or cookies. If you are using a web server like Nginx you might have some access logs on your server. The one liner below uses GoAccess to summarize recent Nginx access logs.
 https://goaccess.io GoAccess
code
 # 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

? Does Scroll support RSS?
Yes! Just create a `feed.scroll` file like this.
 https://github.com/breck7/scroll/blob/main/blog/feed.scroll this

? Does Scroll support categories and category pages?
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.
 https://github.com/breck7/scroll/blob/main/blog/ here

? Does Scroll support Open Graph tags for better social media sharing?
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.
 https://developers.facebook.com/tools/debug Facebook
 https://cards-dev.twitter.com/validator Twitter

? Does Scroll support themes and templates?
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.

? How can I build a scroll from a Twitter account?
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.
 https://www.vicinitas.io/free-tools/download-user-tweets tool

? What were some alternatives considered?
There was no publishing software that reads and writes Scroll yet so building Scroll was necessary. Jekyll and Brecksblog were the two biggest inspirations.
 https://jekyllrb.com Jekyll
 https://github.com/breck7/brecksblog Brecksblog

# Contributing to Scroll development
? How do I contribute?
File issues. Share your Scroll sites.
You can submit pull requests too. The shorter the better.

? How do I debug node.js performance?
code
 # 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

? How is a keyword different than a web components?
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.

? How do I run cross browser tests?
For that we use BrowserStack.
 https://browserstack.com BrowserStack

? Why the name Scroll?
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.

endColumns

replace TreeNotationLinked <a href="https://treenotation.org">Tree Notation</a>
replace GrammarLinked <a href="https://jtree.treenotation.org/designer/#standard%20grammar">Grammar</a>
permalink index.html
import footer.scroll

More Repositories

1

pldb

PLDB: a Programming Language Database. A computable encyclopedia about programming languages.
JavaScript
676
star
2

jtree

Build your own language using Tree Notation.
JavaScript
373
star
3

ohayo

A free, fast, public domain data science studio
JavaScript
127
star
4

copypaster

Make web forms copy-pasteable.
JavaScript
100
star
5

30000hours

How many hours have you spent practicing programming?
59
star
6

domtree

See what your HTML looks like
JavaScript
47
star
7

breckyunits.com

Breck's Blog
HTML
44
star
8

space

This is no longer maintained. Try the much improved version called TreeNotation
JavaScript
31
star
9

CancerDB

CancerDB: a computable encyclopedia about cancer.
CSS
24
star
10

brecksblog

A high performance blog in under 250 lines of code. No MySQL needed!
PHP
22
star
11

ScrollHub

The fastest way to publish.
JavaScript
22
star
12

drillBits

Code from https://queue.acm.org/detail.cfm?id=3448307 unzipped
C
21
star
13

mac

Handy terminal commands for Mac OS X
Shell
19
star
14

research

I moved this folder. Keeping this repo up for archival purposes only.
17
star
15

sleepytimeconference

The conference that comes together while you sleep.
17
star
16

notation.scroll.pub

Scroll Notation Website
JavaScript
16
star
17

tryscroll

Try Scroll in your web browser
JavaScript
15
star
18

leafdb.org

A public domain database about trees.
15
star
19

pytree

Tree Notation Python Library
Python
14
star
20

music

Music Of a People. Music for the people by the people. #BuildPublicDomain
JavaScript
14
star
21

pau

Medical records you can copy and paste
JavaScript
12
star
22

wells

wells 1972 paper
9
star
23

truebase

TrueBase - information you can trust. Software for building computable encyclopedias.
TypeScript
9
star
24

note

This has been replaced by Space
JavaScript
8
star
25

swim

A test suite to make it easier to build Tree Notation libraries in new host langauges
8
star
26

thebook

Tree Notation the Book
7
star
27

copypastetaxes

An open source tax engine so all Americans can do their taxes using simple copy and paste
7
star
28

jefferson

Toy prototype of language for laws and government
6
star
29

simoji

Create back-of-the-envelope multi-agent simulations using emojis.
JavaScript
6
star
30

blog.treenotation.org

Blog of the Tree Notation Lab
Shell
5
star
31

NewtonDB

A database of physics equations and experiments
JavaScript
5
star
32

news.pub

BuilderNews. Builders helping builders. Watch builders try your creations.
HTML
5
star
33

faq.scroll.pub

Scroll Notation FAQ
5
star
34

talkToMoreUsers

"I don't know of a single case of a startup that felt they spent too much time talking to users." - JL #AccelerateTheCures
5
star
35

ovarianlottery.org

HTML
4
star
36

book

Source code for book: A New Way to Program. Particle Notation, Scroll, and the Parsers Programming Language Explained
4
star
37

speedcoach

Benchmark node.js modules to make them faster and lighter
JavaScript
4
star
38

crawlers

Crawlers for extracting measurements from the web for Scroll datasets
JavaScript
4
star
39

lightos

An implementation of Dynamic Land's RealTalk OS
4
star
40

publicdomaincompany.com

Our corporate homepage, blog, and legal department's hard drive.
CSS
4
star
41

pledge.pub

The Public Domain Pledge
4
star
42

codeduel.org

I wish I had heard of this site! - Alexander Hamilton
HTML
4
star
43

lime

A rudimentary implementation of the sublime syntax highlighting engine that I made from reading the docs.
JavaScript
4
star
44

wws

The World Wide Scroll
JavaScript
4
star
45

sets.scroll.pub

Demonstrations of ScrollSets
4
star
46

apply

Web form like its Web 4.0
3
star
47

liberateIdeas

Interesting docs for the Intellectual Freedom movement
3
star
48

longbeach.pub

The Long Beach Pub is a public domain newspaper serving the people of Long Beach, CA
3
star
49

manhattan.pub

The Manhattan Pub is a public domain newspaper serving the people of New York City
3
star
50

munger

A language for honest accounting.
3
star
51

backup

Quickly backup a directory to s3.
JavaScript
3
star
52

funnytombstones.com

My retirement business
HTML
3
star
53

keyboard

Interactive Visualization of the history of the keys on my Mac keyboard
JavaScript
3
star
54

twitterToScroll

Export a Twitter account into a Scroll
JavaScript
3
star
55

hawaii.pub

The Hawai'i Pub is a public domain newspaper serving the people of Hawai'i
3
star
56

stamp-lang

An alternative to zip files for sharing a small collection of folders and text files.
JavaScript
3
star
57

patch

Tiny DSL for isomorphic query strings with zero dependencies
HTML
3
star
58

lab.treenotation.org

Website for Tree Notation Lab. A distributed public domain research lab dedicated to basic research and supported by The Public Domain Publishing Company.
HTML
3
star
59

ctree

Tree Notation C++ implementation
C++
2
star
60

zombo

I reverse engineered Zombo.com so that I learn how to do anything.
CSS
2
star
61

chicago.pub

The Chicago Pub is a public domain newspaper serving the people of Chicago, Illinois
2
star
62

vancouver.pub

The Vancouver Pub is a public domain newspaper serving the people of Vancouver, BC
2
star
63

brecksbananastand.com

I mean it's one banana Michael, what could it cost, $10?
CSS
2
star
64

slots

A demo Tree Language for Scheduling Meetings
2
star
65

mitosispictures.com

Pictures and gifs of cells dividing.
HTML
2
star
66

treerules

JavaScript
2
star
67

sellnothing.com

Believe in your younger self
HTML
2
star
68

grapher

TypeScript
2
star
69

norcal.pub

The Norcal Pub is a public domain newspaper serving the people of the San Francisco Bay Area.
HTML
2
star
70

nevergraduate.org

2
star
71

breckforpresident.com

Breck Yunits for President 2024
2
star
72

braindb

BrainDB: a computable encyclopedia about the brain.
2
star
73

ohayodatasets.breckyunits.com

Public domain datasets for Ohayo
JavaScript
2
star
74

chcopy

Copies the file permissions from one file to another.
Shell
2
star
75

wifinder

Find cafes with fast wifi
HTML
2
star
76

seattle.pub

The Seattle Pub is a public domain newspaper serving the people of Seattle, WA
2
star
77

databall.pub

This. Is. DATABALL!
HTML
2
star
78

freebird

Twitter banned me because they didn't understand "Die Hard" was a movie recommendation. Freebird decentralizes Twitter.
2
star
79

ScrollTalk

Short videos about Scroll and the WWS
2
star
80

strawberry

1
star
81

cldb

The Computer Language Database
1
star
82

schemas.ohayo.computer

A database of schemas to popular datasets
1
star
83

shroomdb.com

A demo
1
star
84

fished

Demo: A text serialization format for Fish Shell's history file.
JavaScript
1
star
85

cancerdb

coming soon
1
star
86

slides

CSS
1
star
87

washington.pub

The Washington Pub is a public domain newspaper serving the people of Washington D.C.
1
star
88

fitbit-story

1
star
89

gotopoint

A Sublime Package for going to a specific character in a file
Python
1
star
90

tumorpictures.com

Pictures of tumors.
JavaScript
1
star
91

aientist

HTML
1
star
92

asif

RFC: Prototype of ASIF
JavaScript
1
star
93

publicdomainwifi.com

Free wifi. No passwords.
HTML
1
star
94

corona-dataset

JavaScript
1
star
95

breckyunits.net

My code journal
CSS
1
star
96

wws-gui

JavaScript
1
star
97

duscore

Data Usability Score: A holistic scoring rubric for datasets
JavaScript
1
star
98

bigfile

Quickly find the biggest files lurking deep in a directory.
JavaScript
1
star
99

6k

1
star
100

git4

Same semantics. Simpler syntax. Coming soon.
1
star