Sort by - committed date
-
Autolink#Markdown Syntax In Scraps, when you write using Markdown’s autolink syntax, it automatically fetches OGP data and displays it as a card. Example In: <https://github.com/boykush/scraps> Out: https://github.com/boykush/scraps
-
CommonMark specification#Markdown Syntax Scraps supports Markdown syntax according to the CommonMark specification. Please refer to the documentation of the pulldown-cmark library used internally for more details. CommonMark specification - pulldown-cmark guide Example In: # Heading 1 ## Heading 2 ### Heading 3 #### Heading 4 Out: Heading 1 Heading 2 Heading 3 Heading 4
-
ConfigurationConfiguration is managed by Config.toml in the Scraps project. Only the base_url and title variables are 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 language (compliant with iso639-1, default=en) lang_code = "en" # 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" # The site color scheme (optional, default=os_setting, choices=os_setting or only_light or only_dark) color_scheme = "os_setting" # Build a search index with the Fuse JSON and display search UI (optional, default=true, choices=true or false) build_search_index = true # 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, default=no pagination) paginate_by = 20
-
CLI/Serve#CLI ❯ scraps serve This command starts a local development server to preview your static site. The server automatically serves the files from the public directory at http://127.0.0.1:1112. Use this command to check how your site looks and functions before deployment.
-
CLI/Build#CLI ❯ scraps build This command processes Markdown files from the /scraps directory and generates a static website. Source Structure ❯ tree scraps scraps ├── Getting Started.md └── What is Scraps?.md Generated Files The command generates the following files in the public directory: ❯ tree public public ├── index.html # Main page with scrap list ├── getting-started.html ├── what-is-scraps.html ├── main.css # Styling for the site └── search.json # Search index (if enabled) Each Markdown file is converted to a slugified HTML file. Additional files like index.html and main.css are generated to create a complete static website. After building, use Serve to preview your site locally.
-
CLI/Init#CLI ❯ scraps init your-scraps-project ❯ cd your-scraps-project This command initializes a new Scraps project. It creates the following structure: ❯ tree -a -L 1 . ├── .gitignore # Git ignore patterns for Scraps projects ├── Config.toml # Project configuration file └── scraps # Directory for your Markdown files After initializing the project, proceed to Build to generate your static site.
-
InstallationYou can find the latest version on GitHub Releases. Requirements The git command is required for features. Cargo ❯ cargo install scraps macOS ❯ brew install boykush/tap/scraps
-
What is Scraps?
-
CLI/Tag#CLI ❯ scraps tag You can debug tag lists.
-
Feature/Search#Search Search index format Scraps can build a search index using the Fuse JSON schema as shown below. [ { "title": "Search", "url": "http://127.0.0.1:1112/scraps/search.html" }, { "title": "Overview", "url": "http://127.0.0.1:1112/scraps/overview.html" }, ... ] Search libraries Scraps content perform searches with fuse.js using an index. We are considering WASM solutions like tinysearch for future performance improvements in our deployment environment. Configuration If you are not using the search function, please modify your Config.toml as follows. See here for Configuration page. # Build a search index with the Fuse JSON and display search UI (optional, default=true, choices=true or false) build_search_index = false