Skip to content

Write for the blog

Explainers, exam tips and notes from the batch, for the batch.

Who can write

Posts live in their own repository, Shubhajeetgithub/FirstYearKGP-blog, separate from the website's code. Anyone with write access to it can publish: ask a maintainer to add you as a collaborator. Every post is a commit, so there is full history and anything can be rolled back.

First time? Add yourself as an author before writing your first post: in the editor, open Authors → New (or add a JSON file to authors/). Your author id is the file name, for example firstname-lastname.

Option A: the online editor

  1. Go to /admin and sign in with GitHub.
  2. Open Blog posts → New, fill in the fields and write the post in Markdown. The preview on the right shows it as it will look on the site, maths included.
  3. Upload images with the image button in the editor; they are stored next to the post.
  4. Leave Draft on while you work. Turn it off and save to publish.
  5. Saving commits to the blog repository. An automatic check builds the site with your post; if it passes, the post appears within a couple of minutes. If it fails, nothing changes on the site and the error is shown under the repository's Actions tab.

Can't sign in? Use Sign In Using Access Token on the login screen. Create a fine-grained personal access token for the blog repository only, with Contents: Read and write permission, and paste it in. The token stays in your browser.

Option B: files and a pull request

  1. Clone Shubhajeetgithub/FirstYearKGP-blog.
  2. Copy TEMPLATE.md to posts/your-post-slug/index.md. The folder name becomes the URL, /blog/your-post-slug.
  3. Put any images in the same folder.
  4. Open a pull request. The check builds the site with your post and reports any problem.

To preview locally, clone the website next to the blog repository and run BLOG_CONTENT_DIR=../FirstYearKGP-blog npm run dev in the website folder, then open http://localhost:4321/blog. You can also open /admin in Chrome or Edge, choose Work with Local Repository and select your clone of the blog repository.

Frontmatter fields

FieldRequiredNotes
title yes The post title.
description yes One or two sentences, at most 160 characters. Used in search results and link previews.
pubDate yes Publication date, YYYY-MM-DD.
author yes Your author id: the file name of your entry in authors/, without .json. Use a list for co-authors.
tags no Lowercase topics, e.g. [signals, fourier]. Spaces become hyphens.
subject no Course code, e.g. AI20203.
updatedDate no Date of a significant update.
cover no Cover image file name, next to the post.
coverAlt no Text description of the cover for screen readers.
draft no true keeps the post off the live site.

Maths

Write LaTeX between dollar signs. There's nothing to switch on: posts with maths load the maths styles automatically.

  • Inline: $e^{j\pi} + 1 = 0$
  • Display: $$ on its own line, the formula, then $$ again.
  • A literal dollar sign is \$.

Rendering uses KaTeX, which supports most of what you would write in a LaTeX report. Long display equations scroll sideways on phones.

Images

  • Keep each image under 300 KB. Prefer WebP, or PNG for diagrams. The site converts and resizes them anyway, but smaller files keep the repository fast.
  • Put images next to the post and link them by file name: ![What the image shows](figure.webp).
  • Always describe the image in the alt text.

Review and guidelines

  • Write for a classmate who missed the lecture: explain, don't just list formulas.
  • Cite sources and link to the original material. Don't upload copyrighted books or papers.
  • Maintainers are notified about new posts and may suggest edits. Readers can comment and react at the bottom of each post.