Medication Tracker

How to update the website

Back to project README

This page explains the documentation website at dev.mongefranco.com/privatium-app-meds. It is for developers. The website is made from the same Markdown files you read on GitHub, so you update it by changing those files. This page also shows how to change the website’s look and how to preview a change.

How the site is built

GitHub Pages builds the site with Jekyll, a program that turns Markdown into web pages. The build follows the same rules GitHub uses to show the files:

The workflow .github/workflows/pages.yml builds the site on every push and pull request. A pull request only builds it, so a page that breaks the build shows up in review. A push to main builds the site and publishes it.

The site lives under dev.mongefranco.com because that is the custom domain of the owner’s GitHub Pages site. GitHub serves each repository’s site under its name, so this repository needs no domain file of its own.

Files that control the site

File What it does
_config.yml The site’s title, description and address, the Google Analytics ID, the Markdown settings, and the files left out of the site.
_layouts/default.html The page around each Markdown file: the header and its links, the footer, and the page title.
assets/css/site.css The colors, fonts and spacing. They follow the Privatium website, so the two sites match.
assets/js/diagrams.js Draws Mermaid diagrams. It loads only on pages that have one.

Each page’s title comes from its first H2 heading, the page subtitle that every documentation page has. So a new page needs no extra setting.

Visitor counts

Every page of the website loads the Google tag, which sends visit counts to Google Analytics. The tag uses the ID in google_analytics_id in _config.yml. To turn it off, for example in a fork, delete that line. The tag is only on the website. The app that runs inside Privatium never loads it, so your records are never sent to Google.

Change a page

Edit the Markdown file and open a pull request. When the pull request merges, the site updates within a few minutes. Keep these rules in mind:

Preview a change

The quickest preview is the pull request’s own build:

  1. Open the pull request’s Checks tab and choose the Website workflow.
  2. Download the github-pages artifact. It holds a file named artifact.tar.
  3. Unpack it into a folder named privatium-app-meds, inside an empty folder, and serve that empty folder:

    mkdir -p site/privatium-app-meds
    tar -xf artifact.tar -C site/privatium-app-meds
    cd site
    python3 -m http.server 8000 --bind 127.0.0.1
    
  4. Open http://127.0.0.1:8000/privatium-app-meds/ in your browser.

The extra folder is needed because the site’s links start with /privatium-app-meds/, the same as on the real site.

You can also build the site on your own computer. You need Ruby and the github-pages gem, which holds the same Jekyll version and plugins as GitHub. Put a Gemfile with the line gem "github-pages", group: :jekyll_plugins in a folder outside the repository, run bundle install there, and then run:

bundle exec jekyll build --source ~/git/privatium-app-meds --destination site/privatium-app-meds

Serve the site folder the same way as above.

Set up GitHub Pages

This is needed once for the repository. In the repository’s Settings, open Pages. Under Build and deployment, set Source to GitHub Actions. The next push to main publishes the site, or run the Website workflow by hand from the Actions tab.

Conclusion

You can now change a page or the site’s look, preview the result, and know when it goes live.

Additional resources

Back to project README


Copyright © 2026 Gabriel Mongefranco