Welcome to ScholarStatic! This is a lightning-fast, ultra-lightweight academic portfolio template.
It is uniquely designed to give you the best of both worlds:
- The Live Website: Pure, blazing-fast HTML, CSS (Tailwind), and vanilla JavaScript. No heavy backend servers, no React overhead on the frontend, and incredibly fast loading times for your visitors.
- The Editor (CMS): A powerful, beautiful local content management system powered by Keystatic. You can easily add publications, edit your biography, and upload images without ever touching a line of code or messing up a JSON file.
If you found this repository and want to use it to build your own personal portfolio, follow these steps exactly!
You want to keep a link to this original code, but you need your own separate repository to host your portfolio.
- Go to this repository on GitHub.
- Click the green "Use this template" button (or click "Fork").
- Name your new repository something like
my-portfolioorkosuke-satake.github.io. - You now have your very own version of the code that you can freely modify!
To edit the site and preview it on your Mac/PC, you need to download it and install the tools.
- Open your terminal and clone your new repository:
git clone https://github.com/YOUR_USERNAME/YOUR_REPOSITORY_NAME.git cd YOUR_REPOSITORY_NAME - Install Node.js dependencies. We use
nvm(Node Version Manager) to ensure you are using the correct version of Node (v24.14.1).nvm use # Tells your terminal to use Node v24 npm install --prefix editor # Installs the Keystatic CMS engine into the editor/ folder
You don't need to edit code to update your portfolio!
- Start the Keystatic CMS:
npm run editor
- Open your browser and go to
http://localhost:4321/keystatic. - You will see a beautiful dashboard with tabs for your English and Japanese content.
- Edit your bio, add publications, or upload a new profile picture. When you click Save, it instantly updates the raw JSON files in
editor/public/data/.
To see exactly what your visitors will see:
- Open a new terminal window in the project folder.
- Start the local static server:
npm start
- Open
http://localhost:3000. You will see your blazing-fast portfolio!
Once you are happy with your edits:
git add .
git commit -m "Update my biography and added a new publication"
git pushIf you use Cloudflare Pages (highly recommended!), you can host this site for free AND configure it so you can log into the editor from any computer (like an iPad or a library computer) without using your terminal!
- Log into your Cloudflare Dashboard -> Pages.
- Click Connect to Git and select your new portfolio repository.
- Configure the Build Settings:
- Framework Preset:
None - Build command:
npm run build - Build output directory:
editor/dist
- Framework Preset:
- Click Save and Deploy. Your site is now live on the internet!
Right now, Keystatic is in "Local Mode" (it saves files to your Mac). To edit from your live Cloudflare URL, we must switch it to "GitHub Mode" so it saves files directly to your GitHub repo.
- Open
editor/keystatic.config.tsxin your code editor. - Find the
storage:block at the very bottom of the file. - Change the
repo:string from'kosuke-satake/scholar-static'to your actual GitHub info (e.g.,'YOUR_USERNAME/YOUR_REPOSITORY_NAME'). - Save the file, commit it, and push it to GitHub.
- Create a GitHub App for Keystatic: You must give Keystatic secure permission to read and write to your repository.
- Go to GitHub.com -> Click your Profile Picture -> Settings -> Developer Settings (at the bottom left) -> GitHub Apps -> New GitHub App.
- Fill out the form exactly like this:
- GitHub App name:
ScholarStatic Editor(or any unique name you want) - Homepage URL:
https://YOUR_SITE.pages.dev(Your live Cloudflare URL) - Callback URL:
https://YOUR_SITE.pages.dev/api/keystatic/github/oauth/callback - Webhook: Uncheck the "Active" box (You do not need Webhooks).
- Repository permissions: Find Contents and change it to Read and write.
- GitHub App name:
- Click Create GitHub App.
- On the next screen, click Generate a new client secret. Keep this tab open for the next step!
- Install the App: In the left sidebar of your new GitHub App, click Install App and install it on your portfolio repository.
- CRITICAL STEP: You must give Cloudflare the secret passwords from your GitHub App!
- Go to your Cloudflare Dashboard -> Pages ->
scholar-static-> Settings -> Environment variables. - Add these three variables to both Production and Preview:
KEYSTATIC_GITHUB_CLIENT_ID(Your GitHub App Client ID)KEYSTATIC_GITHUB_CLIENT_SECRET(Your GitHub App Client Secret)KEYSTATIC_SECRET(A random string of at least 32 characters, likemy_super_secret_random_string_12345!)
- Go to your Cloudflare Dashboard -> Pages ->
- Node Compatibility: While in Cloudflare Settings, go to Functions -> Compatibility flags -> Add the flag
nodejs_compatto both production and preview. (This allows Keystatic to securely encrypt your login session).
Once you save these settings in Cloudflare, wait a few minutes, visit https://YOUR_SITE.pages.dev/keystatic, and click Login with GitHub. It will now successfully authorize you and allow you to edit your site!
ScholarStatic is designed to be fully customizable because nothing is hidden behind a complex framework.
- HTML Structure: Open
index.html. You can add new CSS libraries, change the<head>tags, or modify the footer structure directly. - Styling (Tailwind CSS): Open
css/style.css. We use a compiled Tailwind file. If you want to change core colors or rebuild the CSS, you can install Tailwind CLI and watch thetailwind.config.jsfile. - Logic & Rendering: Open
js/main.js. This is where the magic happens. TheRENDERERSobject controls exactly how the JSON data is converted into HTML. If you want your "Projects" cards to look different, simply edit therenderCardGridfunction!
One of the most powerful features of ScholarStatic is the Layout & Navigation tab in Keystatic. This tab controls what sections appear on your live site and in what order.
Each layout block has four settings (configured as simple dropdowns to prevent typos):
- Section ID: The internal HTML anchor link (e.g.,
#teaching). - Navigation Label: The actual text shown in your top menu (e.g., "Courses").
- Renderer Function: Which visual style to use (e.g., Timeline, Card Grid, List).
- Data Key: Which Keystatic content tab to pull data from (e.g.,
teaching).
What happens if I delete a section? If you delete "Teaching" from the Layout tab, it will instantly disappear from your live website and your top navigation menu! However, the "Teaching" tab will still remain in the Keystatic sidebar. This is intentional! Keystatic acts as a permanent database for all your content. The Layout tab simply decides which of that content is currently "published." If you don't need a tab, you can simply ignore it.
Enjoy your lightning-fast, highly-organized academic portfolio!