A minimalist personal homepage that displays the current Badíʿ date and a daily selection from The Hidden Words by Bahá’u’lláh. It is designed to support spiritual reflection and a centered start to digital interactions.
https://mschwar.github.io/bahai-homepage/
- Daily verse from The Hidden Words
- Badíʿ date display (sunset-accurate when location is available)
- Deterministic daily selection (no randomness)
- Lightweight static site (HTML/CSS/JS + JSON)
Use a simple static server (do not use file://):
python -m http.server 8000Then open http://localhost:8000.
- The quotes JSON is fetched and filtered by the
MAX_QUOTE_WORDSlimit injs/script.js. - The remaining list is indexed by the Gregorian day-of-year (
1–366), using a modulo on the list length. - The selected quote is cached in
localStoragekeyed by:- the local date (
YYYY-MM-DD), and - the Badíʿ day key if available.
- the local date (
- Cached content renders immediately, then refreshes in the background.
- If location permission is granted, the Badíʿ date is calculated using sunset-aware rules.
- If location is denied or unavailable, the site shows a clear message and continues to display the Gregorian date.
- Daily verses are not blocked by the Badíʿ date calculation.
Install dependencies:
pip install requests beautifulsoup4 lxmlRun the scraper:
python scripts/scrape_hidden_words.pyValidate the JSON:
make validateindex.html– page structurecss/style.css– stylesjs/script.js– quote selection, caching, and UI logicjs/badi-init.js– Badíʿ date initializationdata/quotes_hidden_words.json– cached quotes
The Badíʿ date functionality uses BadiDateToday.js by Glen Little.