Skip to content

Commit 9d498ce

Browse files
committed
Add JavaScript page, more redirects, more history
1 parent 207097e commit 9d498ce

File tree

13 files changed

+168
-61
lines changed

13 files changed

+168
-61
lines changed

CHANGELOG.md

Lines changed: 51 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,56 @@
11
# Change Log
22

3-
* 2024-09-18: Started on revamped website with Next.js/Bootstrap 5
4-
* 2024-09-03: Alpha for Rust
5-
* 2021-12-24: Bumped XRegExp to 5.0.1
6-
* 2020-12-25: Moved XRegExp from AppEngine to CloudRun, bumped to 3.2.0
7-
* 2020-06-03: Bumped Ruby to latest version
8-
* 2019-12-19: Bumped Ruby to latest version
9-
* 2019-08-12: Moved Ruby from AppEngine to CloudRun
10-
* 2019-07-26: Moved Tcl to CloudRun
11-
* 2019-07-25: Moved Perl to CloudRun
12-
* 2019-07-10: Moved XRegExp from Now to AppEngine
13-
* 2018-10-16: Moved Tcl from NearlyFreeSpeech to Zeit
14-
* 2018-10-16: Moved XRegExp from Heroku to Now
15-
* 2015-09-28: Bumped XRegExp to 3.0.0
3+
* 2024-09-19: Go bumped to 1.22
4+
* 2024-09-18: website started on revamped using Next.js/Bootstrap 5
5+
* 2024-09-03: Rust alpha
6+
* 2023-11-01: website updated to Java 17
7+
* 2021-12-24: XRegExp bumped to 5.0.1
8+
* 2021-09-05: website added support for cookbook backups
9+
* 2020-12-25: XRegExp bumped to 3.2.0
10+
* 2020-12-25: XRegExp moved to CloudRun from AppEngine
11+
* 2020-12-25: JavaScript bumped to Node 15
12+
* 2020-12-25: JavaScript moved to CloudRun from AppEngine
13+
* 2020-06-03: Ruby bumped to latest version
14+
* 2019-12-19: Ruby bumped to latest version
15+
* 2019-08-12: Ruby moved from AppEngine to CloudRun
16+
* 2019-07-26: tcl moved to CloudRun
17+
* 2019-07-25: Perl moved to CloudRun
18+
* 2019-07-10: XRegExp moved to AppEngine from Now
19+
* 2019-07-10: JavaScript moved to AppEngine from Now
20+
* 2019-03-15: Haskell down (I let NearlyFreeSpeech.net run out)
21+
* 2018-05-18: website updated logo by Noah Marcuse
22+
* 2018-04-22: Ruby moved to Zeit from Heroku
23+
* 2018-04-22: website share buttons
24+
* 2018-04-18: PostgreSQL beta
25+
* 2017-11-30: website switched to https for everything
26+
* 2018-11-30: JavaScript moved to Zeit from Heroku
27+
* 2018-10-16: Java bumped Java to Java 8
28+
* 2018-10-16: tcl moved to Zeit from NearlyFreeSpeech
29+
* 2018-10-16: XRegExp moved to Now from Heroku
30+
* 2018-10-16: JavaScript moved to Now from Heroku
31+
* 2015-09-28: XRegExp bumped to 3.0.0
32+
* 2014-02-15: JavaScript moved to Heroku from AppFog
33+
* 2013-12-28: Haskell beta
1634
* 2013-08-19: Perl contributions from Derek Meade
1735
* 2013-07-23: Perl revamped to use CGI.pm
18-
* 2013-03-09: Timeout support for Java
19-
* 2013-01-20: Beta for Tcl
20-
* 2013-01-12: Beta for Go
21-
* 2012-05-07: Beta for JavaScript
22-
* 2012-04-24: Beta translations (initially with machine translation for French & German)
23-
* 2012-02-26: Beta for PHP
24-
* 2012-02-18: Beta for Ruby
25-
* 2012-02-11: Beta for Python
26-
* 2012-01-07: Live for .Net
27-
* 2011-12-11: New version live for Java, Beta for .Net
28-
* 2011-11-07: Updated theme to Twitter Bootstrap
29-
* 2009-04-19: Moved to RegexPlanet.com
36+
* 2013-07-04: JavaScript moved to AppFog from CloudFoundry
37+
* 2013-03-09: Java timeout support
38+
* 2013-02-04: dotNet bumped to 4.5
39+
* 2013-01-20: tcl beta
40+
* 2013-01-12: Go beta
41+
* 2012-05-07: JavaScript beta
42+
* 2012-04-24: Translations (initially with machine translation for French & German)
43+
* 2012-02-26: PHP beta
44+
* 2012-02-18: Ruby beta
45+
* 2012-02-11: Python beta
46+
* 2012-06-16: XRegExp beta
47+
* 2012-05-27: Go bumped to 1.0
48+
* 2012-05-06: JavaScript beta
49+
* 2012-03-17: Go beta
50+
* 2012-01-12: dotNet golden
51+
* 2011-12-11: Java bumped
52+
* 2011-12-11: dotNet beta
53+
* 2011-12-10: Java separated from www
54+
* 2011-11-07: website changed theme to Twitter Bootstrap
55+
* 2009-04-19: website domain moved to RegexPlanet.com
3056
* 2006-05-20: Initial version on FileFormat.Info

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# RegexPlanet [<img alt="RegexPlanet logo" src="public/favicon.svg" height="90" align="right" />](https://www.regexplanet.com/)
22

3+
[![deploy](https://github.com/regexplanet/regexplanet-next/actions/workflows/gcr-deploy.yaml/badge.svg)](https://github.com/regexplanet/regexplanet-next/actions/workflows/gcr-deploy.yaml)
4+
35
## Running locally
46

57
```

TODO.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,32 @@
11
# To Do
22

3-
- [ ] Dockerfile
4-
- [ ] GHA to deploy
3+
54
- [ ] fill in changelog
6-
- [ ] move redirects into next.config.mjs
7-
- [ ] redirect for shared regexs
8-
- [ ] custom page for /advanced/javascript/index.html
9-
- [ ] bookmarks and rss feed
5+
- [ ] /support/contact.html
6+
- [ ] /advanced/options.html: probably want to redo how these work (each service has 2-way map of specific:common)
7+
- [ ] EngineButton: add color for alpha/beta
8+
- [ ] /support/privacy.html
9+
- [ ] /support/terms.html
10+
- [ ] card per engine on /support/index.html
11+
12+
## Move to Regex.zone
13+
14+
- [ ] /support/links.html: move to Regex.zone
15+
- [ ] /support/similar.html: have a page on Regex.zone
16+
- [ ] /support/engines.html: skip (or include ones that aren't enabled? or page on Regex.zone?)
17+
- [ ] redirects for bookmarks and rss feed
18+
19+
20+
## Share Codes
21+
22+
- [ ] bounce to regex.zone to save
23+
- [ ] accept handle when returning
24+
- [ ] load from regex.zone if handle is passed in (querystring)
25+
- [ ] load from legacy if handle is old format
26+
- [ ] form on home page to enter it
27+
- [ ] if handle passed: overwrite/append/save new instead of save
28+
- [ ] or somehow tell if handle has update permissions
29+
- [ ] setup redirects for existing share codes
1030

1131
## Engines
1232

@@ -43,3 +63,4 @@ Other lists:
4363
- [ ] translations
4464
- [ ] Fuzzing
4565
- [ ] Non-regex pattern matching
66+
- [ ] tags for each engine: features supported, calling languages, implementation language

next.config.mjs

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,24 @@ const nextConfig = {
33
output: "standalone",
44
async redirects() {
55
return [
6-
// Basic redirect
76
{
8-
source: '/support/credits.html',
9-
destination: 'https://github.com/regexplanet/regexplanet-next/tree/main?tab=readme-ov-file#credits',
7+
source: '/advanced/',
8+
destination: '/',
9+
permanent: false,
10+
},
11+
{
12+
source: '/advanced/index.html',
13+
destination: '/',
14+
permanent: false,
15+
},
16+
{
17+
source: '/advanced/javascript/',
18+
destination: '/support/javascript.html',
19+
permanent: false,
20+
},
21+
{
22+
source: '/advanced/javascript/index.html',
23+
destination: '/support/javascript.html',
1024
permanent: false,
1125
},
1226
{
@@ -15,19 +29,29 @@ const nextConfig = {
1529
permanent: false,
1630
},
1731
{
18-
source: '/advanced/',
19-
destination: '/',
32+
source: '/support/api.html',
33+
destination: 'https://github.com/regexplanet/regexplanet-next/blob/main/CONTRIBUTING.md#backend-api',
2034
permanent: false,
2135
},
2236
{
23-
source: '/advanced/index.html',
24-
destination: '/',
37+
source: '/support/credits.html',
38+
destination: 'https://github.com/regexplanet/regexplanet-next/tree/main?tab=readme-ov-file#credits',
39+
permanent: false,
40+
},
41+
{
42+
source: '/support/engines.html',
43+
destination: '/status.html',
2544
permanent: false,
2645
},
2746
{
2847
source: '/support/history.html',
2948
destination: 'https://github.com/regexplanet/regexplanet-next/blob/main/CHANGELOG.md',
3049
permanent: false,
50+
},
51+
{
52+
source: '/support/todo.html',
53+
destination: 'https://github.com/regexplanet/regexplanet-next/blob/main/TODO.md',
54+
permanent: false,
3155
}
3256
/* did not work: {
3357
source: '/advanced/:slug/',

src/app/page.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
/* eslint-disable @next/next/no-img-element */
2+
import { EngineButton } from '@/components/EngineButton';
23
import { getEngines } from '@/engines';
34

45
export default function Home() {
56

67
const buttons = getEngines().map((engine) => {
7-
return (
8-
<a className="btn btn-outline-light border-dark m-2"
9-
key={engine.handle}
10-
href={`/advanced/${engine.handle}/index.html`}
11-
title={engine.short_name}>
12-
<img alt={engine.short_name}
13-
src={engine.logo_ar21}
14-
style={{"height": "6em"}}
15-
/>
16-
</a>
17-
);
8+
return ( <EngineButton key={engine.handle} engine={engine} />);
189
});
1910

2011
return (

src/app/sitemap.xml/route.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@ const ROOT = "https://www.regexplanet.com";
55

66
export async function GET() {
77
const urls = [
8-
`${ROOT}/`,
9-
`${ROOT}/status.html`,
10-
`${ROOT}/support/index.html`,
8+
`/`,
9+
`/status.html`,
10+
`/support/index.html`,
11+
`/support/javascript.html`,
1112
];
1213

1314
getEngines().forEach((engine) => {
14-
urls.push(`${ROOT}/advanced/${engine.handle}/index.html`);
15+
urls.push(`/advanced/${engine.handle}/index.html`);
1516
});
1617

17-
const body = urls.map((url) => `\t<url><loc>${url}</loc></url>`).join("\n");
18+
const body = urls
19+
.map((url) => `\t<url><loc>${ROOT}${url}</loc></url>`)
20+
.join("\n");
1821

1922
const text = `<?xml version="1.0" encoding="UTF-8"?>
2023
<?xml-stylesheet type="text/xsl" href="/sitemap.xslt" ?>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* eslint-disable @next/next/no-img-element */
2+
import React from 'react';
3+
import { getEngines } from '@/engines';
4+
import { EngineButton } from '@/components/EngineButton';
5+
6+
export default function Page() {
7+
8+
const buttons = getEngines().filter(engine => engine.javascript).map((engine) => {
9+
return ( <EngineButton key={engine.handle} engine={engine} />);
10+
});
11+
12+
13+
return (
14+
<>
15+
<h1>JavaScript Regex Engines</h1>
16+
<hr />
17+
<div className="alert alert-info" role="alert">There are multiple JavaScript regular expression engines available. Each engine has its own unique features and capabilities.</div>
18+
<div className="row">
19+
<div className="col d-flex flex-wrap justify-content-center">
20+
{buttons}
21+
</div>
22+
</div>
23+
</>
24+
);
25+
}

src/app/support/xcredits.html/page.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/components/EngineButton.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* eslint-disable @next/next/no-img-element */
2+
3+
import { RegexEngine } from "@/engines/RegexEngine";
4+
5+
6+
export function EngineButton(props: { engine: RegexEngine }) {
7+
return (
8+
<a className="btn btn-outline-light border-dark m-2"
9+
href={`/advanced/${props.engine.handle}/index.html`}
10+
title={props.engine.short_name}>
11+
<img alt={props.engine.short_name}
12+
src={props.engine.logo_ar21}
13+
style={{ "height": "6em" }}
14+
/>
15+
</a>
16+
);
17+
}

src/engines/RegexEngine.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ type RegexEngine = {
66
help_label: string;
77
help_url: string;
88
handle: string;
9+
javascript?: boolean;
910
level: "alpha" | "beta" | "golden";
1011
links: Record<string, string>;
1112
logo_icon: string;

0 commit comments

Comments
 (0)