Coder Social home page Coder Social logo

stscoundrel / cleasby-vigfusson-next Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 11.87 MB

The Cleasby & Vigfusson Old Norse Dictionary for Next.js

Home Page: https://cleasby-vigfusson-dictionary.vercel.app/

License: MIT License

JavaScript 28.17% SCSS 6.61% TypeScript 65.22%
dictionary old-norse cleasby-vigfusson old-icelandic javascript nextjs medieval-languages medieval-studies

cleasby-vigfusson-next's People

Contributors

dependabot[bot] avatar stscoundrel avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cleasby-vigfusson-next's Issues

Random entries: add min length

Some definitions (probably incorretly) may have only one letter, rest of the definition being parsed into second definition,

While it matters little in the word definition page, it does not look great as the selected definition in the frontpage. Just add min length to the randomizer algorithm, producing entries that always have content

Dictionary: use lowercase headwords

Some headwords are written in allcaps, while some are capitalized and some are lower case.

This generally does not matter much and does reflect the original source material, but the uppercase ones seem a bit odd in middle of sentences.

Either:

  • Lowercase them in word pages in middle of sentences
  • Or lowercase them in dictionary service already

GH actions: remove build

Integration tests build the whole thing, eg. ensure build works. No need to do it twice in GH actions.

Revalidate scripts: add retries

Should request fail (=timeout, most likely), gather failed batches into retries. Run them with smaller batch size, like 100.

Add API endpoint for ISR on demand

Should provide alternative avenue for building all ISR pages.

Current problem: many more pages that can be build & deployed to Vercel. There is hard limit of 16 00 files. Once the project is deployed, it can generate as many more as it needs. But it has to happen after deployment.
Current solution: use ISR to generate pages as users open them. Downside is that the first load can then be slow. Other approach is to use Gangleri, a tool to walk sitemaps, therefore triggering rebuilds. However, that is slow as it makes separate request for each and can be spammy.

New solution:

  • Add API endpoint
  • Protect with env secret. Important as hell, as this could potentially cause a lot of processing spam.
  • Trigger revalidate of either all pages, or a subset based on some param. See how long rebuild takes etc.

Add mobile nav

Letterlist in mobile is kinda awkward. Hide behind hamburger.

Random entries section: make more usable

Currently the "random entries" section in frontpage feels a bit weird. Some things that could improve it:

  • Smaller amount of entries (less screen space)
  • Alphabetical order
  • Possibly definition excerpt? May need to limit entries to those that actually have one definition of reasonable length. Considering special nature of Cleasby & Vigfusson, may not be possible. Would probably work better with Zoegas shortform definitions

Switch Babel to SWC

SWC seems to now support all Babel features used in the dictionary.

  • Switch to SWC compile
  • Switch to SWC minimize
  • Drop Babel deps
  • Drop Terser dep. Probably not needed in current version

Words: add possible runic inscription

Using younger futhark, add possible runic inscriptions of headwords. Just transform letter by letter. Would vary from historical forms, but interesting

Older spellings: offer variations where ö is replaced by ǫ

O caudata (= ǫ) would be more accurate letter for words that use "ö" in the Cleasby Vigfusson book. Using "ö" in Old Norse is a more modern practice that is mostly based on modern Icelandic and/or lack of letter ǫ in all keyboard setups.

Should the word contain letter ö, offer alternative version with ǫ. When that is done, also offer an explanation as to why this alternative form exists. Similar work is done for Old Swedish dictionary in this PR.

Robots.txt -> move to static file

Currently generates on demand each time, but contents of the file haven't really changed from the start. Just use .txt file in public & drop the page path

Add src folder

Nowadays Next.js supports having "src" folder instead of top level pages. Simplify top level by adding src folder

Add cited sources page

Similar to Old Swedish dictionary.

  • Add page for listing all works, authors and sources of the book
  • Should there be works & authors cited, add a link to the all sources page

Word page: "source" the definitions

Individual word page does not say where the definition is from, ie. the Cleasby/Vigfusson Dictionary. Add something like:

As defined by the Cleasby & Vigfusson Old Norse to English dictionary:

Add TypeScript supports

Not a full rewrite, but deps & defs that let JS & TS play together. Much like Zoega version

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.