https://github.com/bernoussama/xbyexample
X by Example is a CookBook for programming languages!
https://github.com/bernoussama/xbyexample
examples learning learning-notes learning-resources
Last synced: 3 months ago
JSON representation
X by Example is a CookBook for programming languages!
- Host: GitHub
- URL: https://github.com/bernoussama/xbyexample
- Owner: bernoussama
- License: mit
- Created: 2024-11-29T11:17:46.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-30T21:55:18.000Z (about 1 year ago)
- Last Synced: 2025-02-13T21:39:12.030Z (12 months ago)
- Topics: examples, learning, learning-notes, learning-resources
- Language: Astro
- Homepage: https://xbyexample.dev
- Size: 107 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#  by Example
[xbyexample.dev][site] is a website that serve as a reference for programming languages via annotated example programs.
## Motivation
I have a lot of unorganised notes of programming languages and i needed somewhere to put them, so i built this website to organise my notes, keep them as a reference and share them with the community.
I decided to go with [Astro][astro] because of markdown support, i write examples in markdown and Astro generate the static HTML, that's all i needed.
## 🚀 Project Structure
```text
/
├── public/
│ └── favicon.svg
├── src/
│ ├── components/
│ │ └──
│ ├── layouts/
│ │ └── Layout.astro
│ └── pages/
│ └── [language]
│ └── index.astro
│ └── *.md
└── package.json
```
## 🧞 Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |
## 👏 Contributing
I would love your help! Contribute by forking the repo and opening pull requests.
All pull requests should be submitted to the main branch.
### How to Contribute
- Fork the repo
- Clone your fork locally
- install dependencies(make sure you have node installed)
- Add an Example
- to add an example, run `npm run add -l `, a script will generate a markdown named `.md` in the `src/pages/`, containing a boilerplate to add your example.
## License
> This project is [MIT][license] licensed
> The examples are licensed under [CreativeCommons][ccby4.0]
## 👀 Acknowledgments
- Thanks [Go by Example][gobyexample] for inspiring this project.
- Made with [Astro][astro]
[site]: https://xbyexample.dev
[astro]: https://astro.build
[gobyexample]: https://gobyexample.com
[ccby4.0]: https://creativecommons.org/licenses/by/4.0/
[license]: /LICENSE