Skip to content

Commit

Permalink
Merge pull request #346 from jcubic/docusaurus
Browse files Browse the repository at this point in the history
Docusaurus new website
  • Loading branch information
jcubic authored Mar 28, 2024
2 parents 9bcc486 + 8b1fc3a commit f9cf508
Show file tree
Hide file tree
Showing 144 changed files with 24,578 additions and 794 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
API_KEY=4430fd1c-592b-4704-8230-38e9e3b01e2a
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
* text eol=lf
.* text eol=lf
dist/* binary
*png binary
*ico binary
package-lock.json binary
assets/classDiagram.svg binary
assets/*.png binary
Expand All @@ -9,4 +11,5 @@ tests/snapshots/* binary
*.xcb binary
dist/** linguist-generated
*config.js linguist-vendored
docs/** linguist-vendored
**/*.lips linguist-language=scheme
9 changes: 9 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ name: Build and test

on:
push:
paths:
- "template/Makefile"
- "Makefile"
- "scripts/*"
- "tests/*"
- "bin/*"
- "lib/*"
- "src/*"
- ".github/workflows/build.yaml"
branches:
- master
- devel
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/codespell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ jobs:
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
with:
skip: ./docs/package-lock.json
51 changes: 51 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: build docs
run-name: ${{ github.actor }} building documentation 🚀
on:
push:
paths:
- "docs/**"
- ".github/workflows/docs.yaml"
branches:
- docusaurus
- master

permissions:
contents: write

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
working-directory: docs

jobs:
deploy:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: docs/package-lock.json

- name: Install dependencies
run: npm ci

- name: create version file
run: npm run version

- name: Build website
run: npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.repository == 'jcubic/lips-website' || (github.repository == 'jcubic/lips' && github.ref_name == 'master')}}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: publish test coveralls lint zero coverage
.PHONY: publish test coveralls lint zero coverage codespell

VERSION=1.0.0-beta.18.1
VERSION_DASH=`echo -n "1.0.0-beta.18.1" | sed "s/-/%E2%80%93/"`
Expand All @@ -23,6 +23,7 @@ CAT=cat
NPM=npm
NODE=node
WGET=wget
CODESPELL=codespell
ESLINT=./node_modules/.bin/eslint
COVERALLS=./node_modules/.bin/coveralls
JEST=./node_modules/.bin/jest
Expand All @@ -37,7 +38,7 @@ define ver_date
-e "s/{{YEAR}}/${YEAR}/" $(1) || $(SED) -i -e "s/{{VER}}/DEV/g" -e "s/{{DATE}}/$(DATE)/g" $(1)
endef

ALL: Makefile package.json .$(VERSION) assets/classDiagram.svg dist/base.js dist/lips.js dist/lips.esm.js dist/lips.min.js dist/lips.esm.min.js README.md dist/std.min.scm dist/std.xcb
ALL: Makefile package.json .$(VERSION) assets/classDiagram.svg dist/base.js dist/lips.js dist/lips.esm.js dist/lips.min.js dist/lips.esm.min.js README.md dist/std.min.scm dist/std.xcb docs/reference.json

dist/banner.js: src/banner.js src/lips.js .$(VERSION)
$(CP) src/banner.js dist/banner.js
Expand All @@ -62,6 +63,9 @@ dist/std.scm: lib/bootstrap.scm lib/R5RS.scm lib/byte-vectors.scm lib/R7RS.scm l
dist/std.xcb: dist/std.scm
$(LIPS) -t --bootstrap dist/std.scm -c -q dist/std.scm

docs/reference.json: dist/std.xcb src/lips.js
$(NODE) ./scripts/reference.js > docs/reference.json

dist/std.min.scm: dist/std.scm
$(LIPS) -t --bootstrap dist/std.scm ./scripts/minify.scm ./dist/std.scm > dist/std.min.scm

Expand Down Expand Up @@ -126,5 +130,8 @@ watch-make:
coverage:
$(NPM) run coverage

codespell:
$(CODESPELL) -S 'package-lock.json,node_modules,build,coverage'

lint:
$(ESLINT) src/lips.js lib/js/bookmark.js
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<h1 align="center">
<img src="https://github.com/jcubic/lips/blob/devel/assets/lips.svg?raw=true"
<img src="https://github.com/jcubic/lips/blob/docusaurus/assets/lips.svg?raw=true"
alt="LIPS - Scheme Based Powerful Lisp Language" />
</h1>

[![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/lips_lang)](https://twitter.com/lips_lang)
[![npm](https://img.shields.io/badge/npm-1.0.0%E2%80%93beta.18.1-blue.svg)](https://www.npmjs.com/package/@jcubic/lips)
![1.0.0 Complete](https://img.shields.io/github/milestones/progress-percent/jcubic/lips/1?label=1.0.0%20Complete)
[![Build and test](https://github.com/jcubic/lips/actions/workflows/build.yaml/badge.svg?branch=devel&event=push)](https://github.com/jcubic/lips/actions/workflows/build.yaml)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/lips/badge.svg?branch=devel&d10e8d3a3a0f2e4c8dbb6717a10f4367)](https://coveralls.io/github/jcubic/lips?branch=devel)
[![Build and test](https://github.com/jcubic/lips/actions/workflows/build.yaml/badge.svg?branch=docusaurus&event=push)](https://github.com/jcubic/lips/actions/workflows/build.yaml)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/lips/badge.svg?branch=docusaurus&43d437d0f754f33d6feaceaa59b38693)](https://coveralls.io/github/jcubic/lips?branch=docusaurus)
[![Join Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jcubic/lips)
![NPM Download Count](https://img.shields.io/npm/dm/@jcubic/lips)
![JSDelivr Download count](https://img.shields.io/jsdelivr/npm/hm/@jcubic/lips)
Expand Down Expand Up @@ -162,7 +162,7 @@ npm install -g @jcubic/lips@beta

you can run the interpreter from the terminal:

![LIPS: Scheme interactive terminal](https://github.com/jcubic/lips/blob/devel/assets/screencast.gif?raw=true)
![LIPS: Scheme interactive terminal](https://github.com/jcubic/lips/blob/docusaurus/assets/screencast.gif?raw=true)


You can also run code in a string with:
Expand Down Expand Up @@ -201,7 +201,7 @@ Executables also return a S-Expression according to SRFI-176 use `lips --version

## FOSDEM'23 Presentation [Video]

[![FOSDEM 2023 - LIPS Scheme: Powerful introspection and extensibility](https://github.com/jcubic/lips/blob/devel/assets/fosdem-intro.png?raw=true)](https://fosdem.org/2023/schedule/event/lipsscheme/)
[![FOSDEM 2023 - LIPS Scheme: Powerful introspection and extensibility](https://github.com/jcubic/lips/blob/docusaurus/assets/fosdem-intro.png?raw=true)](https://fosdem.org/2023/schedule/event/lipsscheme/)

## Limitations

Expand All @@ -210,7 +210,7 @@ Because LIPS is tree walking interpreter, sometimes it may be slow. Especially i
process long arrays and use callback function. If the array is quite large each piece of code
inside the callback may slow down the processing. For example see:

script [reference.scm](https://github.com/jcubic/lips/blob/devel/scripts/reference.scm)
script [reference.scm](https://github.com/jcubic/lips/blob/docusaurus/scripts/reference.scm)

That generates reference documentation for all builtin functions and macros.
The slow part is `(names.sort name-compare)` (`Array::sort`) that take quite time to calculate,
Expand Down
25 changes: 20 additions & 5 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
25 changes: 0 additions & 25 deletions docs/404.html

This file was deleted.

32 changes: 0 additions & 32 deletions docs/Gemfile

This file was deleted.

82 changes: 0 additions & 82 deletions docs/Gemfile.lock

This file was deleted.

41 changes: 41 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# LIPS Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
Loading

0 comments on commit f9cf508

Please sign in to comment.