Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/likianta/code-snippet-book
Craft your fancy works with the loved code snippets.
https://github.com/likianta/code-snippet-book
code-copy-paste code-gist code-snippet copy-code gists nextra python
Last synced: about 9 hours ago
JSON representation
Craft your fancy works with the loved code snippets.
- Host: GitHub
- URL: https://github.com/likianta/code-snippet-book
- Owner: likianta
- Created: 2023-07-05T03:10:26.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-07-28T10:24:53.000Z (over 1 year ago)
- Last Synced: 2024-12-15T07:12:35.683Z (about 2 months ago)
- Topics: code-copy-paste, code-gist, code-snippet, copy-code, gists, nextra, python
- Language: MDX
- Homepage: https://likianta.github.io/code-snippet-book/
- Size: 1.49 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Likianta Code Snippet Book
## Motivation
this is mainly for showing something via **[Nextra](https://nextra.site/)** site generator. visit the deployed site effect [here](https://likianta.github.io/code-snippet-book).
## Installation
the main stack is nodejs (nextjs), while the plugin scripts are written in python.
we need to both init them:
nodejs:
```sh
# install by `project.json`
npm install
```python (poetry):
```sh
# install by pyproject.toml
poetry update
```## Development
```sh
npm run dev
```## Deploy
```sh
# build but not deploy (useful for checking if build worked)
npm run build# build and deploy
npm run deploy
```notice: make sure there exists `./out/.nojekyll` file (an empty file). otherwise the github pages will be failed finding javascript and stylesheets.
## Test deployment in local
```
|=
|= docs
|- index.html
|- ...
|=
|= code-snippet-book # symlinked from `/docs`
|- index.html
|- ...
``````sh
npm run build
poetry run python3 -m http.server 3001 -d
```visit http://localhost:3001/code-snippet-book to see effect.