Go to file
2024-11-30 12:25:49 +03:00
data Replace NPM with SPC in magprog. 2024-11-30 12:25:49 +03:00
gradle/wrapper Hack to fix language switch 2024-02-28 22:06:36 +03:00
src Replace NPM with SPC in magprog. 2024-11-30 12:25:49 +03:00
.gitignore Update to DataForge 0.8 2024-02-19 19:47:37 +03:00
.space.kts Add Gorbachev.md. 2023-07-11 18:31:34 +03:00
build.gradle.kts [WIP] refactor in progress 2024-01-04 11:26:23 +03:00
gradle.properties Update to DataForge 0.8 2024-02-19 19:47:37 +03:00
gradlew Fix content overlapping footer on /people/* pages 2022-09-26 22:37:39 +03:00
gradlew.bat initial commit 2022-04-23 10:48:53 +03:00
README.md Update readme 2022-06-26 13:14:57 +03:00
settings.gradle.kts Hack to fix language switch 2024-02-28 22:06:36 +03:00

Scientific programming center site

The site is here

The mechanics

The site is a unique mix between static and dynamic content rendering. It uses DataForge and a prototype for SNARK project to load data lazily and render it with very low resource consumption.

The idea is the following:

  • The file tree from data directory is lazily loaded into a DataForge DataSetstructure. Each element in a DataSet is a lazy data with eagerly loaded metadata. In case of files, metadata includes some file parameters like extensions and creation time a front matter YAML translated into DF Meta.
  • The DataSet is transformed using parsers defined in SnarkPlugin. Parser transforms the bytearray-like file content into some typed object like Markdown or Html. Json/yaml files are transformed into Meta. All objects are lazy, they are not parsed and computed until they are read.
  • There could be additional transformation for tree. For example severl blocks could be combined into one. Data could be loaded inside the page, etc.
  • The resulting DataSet is loaded into a PageContext, which is used by a site template to render resulting pages.
  • In the future, there will be utilities to automatically transform into a DataSet, loading templates as plugins.
  • Once computed, the data is cached in-memory and is not recomputed until the underlying data is changed.
  • A PageContex is loaded as a context receiver for all page rendering activities. It allows to seamlessly load data into the page, also it could be substituted on language change or other configuration changes. Also one could use PageContext to isolate different parts of site from each other.

References

Currently, we use two different designs from https://html5up.net/