Skip to content

Commit

Permalink
docs: simplify readme
Browse files Browse the repository at this point in the history
  • Loading branch information
2KAbhishek committed May 6, 2024
1 parent 6c5b5db commit 07bd889
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 31 deletions.
54 changes: 23 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Also shows pretty programming icons using `devicons`.

## Inspiration

Needed a way to display all my projects, used my [portfolio's project section](https://2kabhishek.github.io/#projects) as inspiration.
Needed a way to display all my projects, that should auto update from GitHub

## Getting Projects

Expand All @@ -50,35 +50,34 @@ git clone https://github.com/2kabhishek/projects
cd projects
```

## Setup Your Own Projects
### Setup Your Own Projects

You can easily set up projects to show your own repos.
You can set up projects for yourself by following these steps:

- Fork the repo
- Clone it
- Fork the repo: https://github.com/2kabhishek/projects
- Clone it locally / Open it in GitHub Codespaces
- Open up `script.js` and update the `username` variable to your GitHub username.
- Open up `index.html` and update the `title` tag to make it your username.
- If you want to update the favicon too, update the `link` tag for it in `index.html`
- Push your changes
- Go to repo settings on GitHub and enable GitHub Pages.
- Open up `index.html` and update the `title` tag to make it your own.
- You may also want to update the favicon by updating the `link` tag in `index.html`
- Commit and push your changes
- Go to repo settings on GitHub, under `Pages` enable GitHub Pages.
- Choose 'Deploy from a branch' with the `main` branch and `/` as the root directory.
- Done!

The site should be live on `https://<your-username>.github.io/projects`

Here's the projects page for [@sindresorhus](https://github.com/sindresorhus)
#### Number Of Repos

![sindresorhus's projects](./images/demo.png)

### Number Of Repos

The number of repos is controlled by the `maxPages` variable, the GitHub API supports 100 repos per page max.
The number of repos shown changes with the `maxPages` variable, the GitHub API supports 100 repos per page max.
If you have less than 100 repos, set `maxPages` to 1, if you have 300 then 3.

You can also edit the fetch query to reduce the per page repo count.
> There's no pagination, all repos are shown on the same page.

> There's no pagination, all repos show up on the same page.
### Forked Repos

Forked repos are hidden by default, to show them set `hideForks = false` in `script.js`
To show forked repos set `hideForks = false` in `script.js`

### Authenticated Requests

Expand All @@ -88,30 +87,23 @@ You can either wait for an hour or setup a personal access token on GitHub and p

### Themes

Comes with a dark and light theme by default, depends upon your system configs.
Edit the variables under `:root` in `styles.css` to modify colorscheme.
Comes with a dark and light theme by default, depends upon your system and browser settings.

![Light screenshot](./images/screenshot-light.png)
Edit the variables under `:root` in `styles.css` to change color scheme.

### Programming Language Icons

This project uses [Devicon](https://devicon.dev/) for adding language icons, if the language name and icon are not being
displayed correctly for any of your repos, update `devicons` mapping in `script.js`.

## Viewing projects

Open `index.html` in your favorite browser or visit [2kabhishek.github.io/projects](https://2kabhishek.github.io/projects).
This project uses [Devicon](https://devicon.dev/) for adding language icons, if the language name and icon are not
displayed, for any of your repos, update `devicons` mapping in `script.js`.

## How it was built

Projects was built using `HTML` `CSS` & `JavaScript`.
It was built on Neovim and the python http server.
Uses GitHub API for data and Devicons for programming icons.
I built `Projects` using `HTML` `CSS` `JavaScript` and Neovim

## What I learned

- Learned about a few quirks of the fetch API, especially implementation of `maxPages`.
- Flex, box-shadow and some other CSS tricks were revisited.
- Learned about some quirks of the fetch API, during implementation of `maxPages`.
- Revisited Flex, box-shadow and some other CSS tricks

## What's next

Expand Down
Binary file removed images/demo.png
Binary file not shown.
Binary file removed images/screenshot-light.png
Binary file not shown.

0 comments on commit 07bd889

Please sign in to comment.