Sort by - commited date
-
Configuration
Configuration is managed by Config.toml in the Scraps project. Only the title variable is required. Everything else is optional. All configuration variables used by Scraps and their default values are listed below. # The site base url base_url = "https://username.github.io/repository-name/" # The site title title = "" # The site description (optional) description = "" # The site favicon in the form of png file URL (optional) favicon = "" # The site timezone (optional, default=UTC) timezone = "UTC" # Scraps sort key choice on index page (optional, default=committed_date, choices=committed_date or linked_count) sort_key = "committed_date" # Scraps pagination on index page(optional) paginate_by = 20
-
Scraps
Internal links like wiki Specifying the name of the markdown file with a notation such as [[Link]] will generate a wiki-like internal link. For example, if you have the following set of files. ❯ tree scraps scraps ├── Overview.md └── Usage.md Fill in the file name in the scraps directory in Overview.md as follows to generate the link. See [[Usage]] for detail. Tags as nonexistent links If there is no scraps with the specified title, such as #SampleTag1, then it will be a tag. Tags are lined up on the index page, and the link is to a page with a list of scraps that have the tag.
-
Deploy
Github Pages Custom actions are available to deploy Scraps to Github Pages. scraps-deploy-action YAML file Prepare a yaml file under .github/workflows/ like this name: Build and deploy GH Pages on: push branches: - main paths: - 'scraps/**' jobs: build: runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v3 with: fetch-depth: 0 # For scraps git commited date - name: build_and_deploy uses: boykush/scraps-deploy-action@v2 env: # Target branch PAGES_BRANCH: gh-pages # Provide personal access token TOKEN: ${{ secrets.GITHUB_TOKEN }} GitHub settings Set up GitHub Pages for the repository. Build and deployment parameter as follows. Source: Deploy from a branch Branch: gh-pages
-
Getting Started
Installation ❯ cargo install scraps mac OS ❯ brew install boykush/tap/scraps Init project git command is required for features ❯ scraps init your-scraps-project ❯ cd your-scraps-project The output result will look like this ❯ tree -a -L 1 . ├── .git ├── .gitignore ├── Config.toml └── scraps Configuration Edit Config.toml to settings. title = "your scraps project" See Configuration for other config. Write scraps Write markdown files under /scraps dir. ❯ tree scraps scraps ├── Getting Started.md └── Scraps.md See Scraps for scraps notation in markdown files. Build a static site ❯ scraps build The output will be a slugged html file as follows. ❯ tree public public ├── getting-started.html ├── scraps.html ├── index.html └── main.css Debug server ❯ scraps serve You can debug the build outputs by visiting http://127.0.0.1:1112 Deploy pages See Deploy.