Personal academic website for Pedro Miraldo, served via GitHub Pages.
Live site: https://pmiraldo.github.io/
- Static HTML pages
- SCSS/CSS styling (
app/scss) - Vanilla JavaScript for shared navbar behavior (
app/js/nav.js) - Static assets (images, PDFs, videos, project media)
.
├── index.html
├── publications.html
├── students.html
├── nav.html
├── app/
│ ├── js/nav.js
│ └── scss/
│ ├── style.scss
│ ├── style.css
│ └── _*.scss
├── projects/
│ ├── bansac/bansac.html
│ ├── ref_line_intersect/line_intersect.html
│ └── regnet/regnet.html
└── figures/, people/, project_gif/, pub/, videos/, ...
- Each page includes:
<body id="body_id">- page flags (
project,merl,ist) <script id="replace_with_navbar" src="/app/js/nav.js"></script>
app/js/nav.jsfetchesnav.htmland injects it into each page.- Active menu highlighting is based on
window.location.pathname. - Project page highlighting is controlled by
projectLinkByPathinapp/js/nav.js.
If you add a new project page, update:
nav.html(add the link in the project dropdown)app/js/nav.js(add path-to-link mapping inprojectLinkByPath)
Because the navbar is loaded with fetch("/nav.html"), use a local web server (do not open files directly with file://).
cd /path/to/pmiraldo.github.io
python3 -m http.server 8000Open: http://localhost:8000
This repository includes:
mise.tomlfor runtime + task managementpyproject.tomlfor Python tooling dependenciespackage.jsonfor npm tooling dependencies (sass,prettier,htmlhint,eslint).pre-commit-config.yamlfor git hooks.htmlhintrcfor HTML lint rulesmiseaddsnode_modules/.bintoPATH([env]._.path) so local npm CLIs can be called directly.
mise trust
mise install
mise run precommit_installRun project checks:
mise run lint_html
npm run lint:js
mise run precommit_runIt's highly recommended to run pre-commit directly, and make sure that all issues are fixed:
pre-commit run --all-files- Rules are defined in
.htmlhintrc. - To adjust lint strictness, enable/disable rules in that file.
- The pre-commit hook runs
htmlhint --config .htmlhintrc.
- JS formatting is handled by Prettier (
prettier-jspre-commit hook). - JS non-format checks are handled by ESLint (
eslint-jspre-commit hook). - Both hooks apply to files under
app/js/**/*.js.
- SCSS entrypoint:
app/scss/style.scss - Compiled stylesheet used by pages:
app/scss/style.css
If you use Sass locally:
mise run sass_build
# or directly: sass app/scss/style.scss app/scss/style.cssOr watch mode:
mise run sass_watch
# or directly: sass --watch app/scss/style.scss:app/scss/style.css- Update homepage highlights in
index.html. - Update publication list in
publications.html. - Update student/intern entries in
students.html. - Keep project pages under
projects/consistent with nav links.
MIT. See LICENSE.