This website is written in AstroJS. Learn more about Astro in its documentation! Note that Astro is Typescript-based, although a minimal knowledge is necessary: The contents of this website are entirely written in Markdown!
For how-tos FAQs specific to the AABI website, please see below.
Install Bun (it's a faster, modern NodeJS alternative --- a Javascript runtime): https://bun.sh/docs/installation. Then, install all dependencies:
bun install
To serve the website locally for development, run:
bun astro dev
And finally, go to https://localhost:4321
.
Before pushing to Github, check and test-build the site:
bun astro check
bun astro build
The actual build & deploy to https://approximateinference.org are automatically handled by the Github action in .github/workflows/deploy.yml
, as soon as the master
branch is updated.
Simply update src/contents/call.md
.
- Go to
src/contents/schedule.md
. - Simply write standard markdown tables to create the schedule. E.g. use this website: https://www.tablesgenerator.com/markdown_tables.
- Put profile pictures/headshots into
public/images/people
directory. - Update
src/assets/invited_speakers.json
andsrc/assets/organizers.json
by following this format: (Notice thatpic
should point to the path of the profile picture you have put intopublic/images/people
.)
[
{
"name": "...",
"affiliation": "...",
"pic": "/images/people/...",
"link": "https://..."
}
]
- How does it work? Go to
src/contents/index.mdx
. (Note that.mdx
is like.md
but can use Astro components.) Notice that near the beginning of the file, we load the JSON file content, load thePeopleList
component fromsrc/components/PeopleList.astro
, and then pass the JSON object intoPeopleList
in the content. Note that the object schema is defined insrc/utils/person.ts
.
- Obtain the accepted papers list from Openreview, using their API.
- Store the returned JSON file in
src/assets/accepted_papers.json
. - The page
https://approximateinference.org/accepted
will automatically be populated during deployment. - How does it work? Go to
src/contents/accepted.mdx
--- the JSON file is loaded there and passed to thePaperList
component. Note that the object schemas are defined insrc/utils/paper.ts
.
Tip
Check src/pages/index.astro
for example.
- Create a new page in
src/pages
, e.g.new_page.astro
. You can copy-paste the exsisting page. Note that, the filename is important since it reflects the site endpoint:new_page.astro
translates intohttps://approximateinference.org/new_page
. - Put the following into
new_page.astro
:
---
import { Content } from "../contents/new_page.md";
---
// Some HTML elements here
<Content />
// Some other HTML elements here
- Next, create the content itself, in the form of a markdown document in
src/contents
. In this example, we createsrc/contents/new_page.md
. Don't forget to set the title in the front matter. Note that you can also use.mdx
extension. In this case, you will be able to use Astro components inside the markdown file. Seesrc/contents/index.md
for an example. See also Astro's documentation.
---
layout: ../layouts/ContentLayout.astro
title: "New Page"
---
Your content here! It's just a standard markdown you know and love!
- Then, you can link the page into the navbar in the header. This can be done by modifying
src/components/layout/Header.astro
. Simply copy-paste the existing nav link there and modify as necessary. Otherwise, you can simply link the new page as usual in other markdown files.