Sort by - committed date
-
Context link
#Internal link #Markdown Syntax In cases where the same term exists in different contexts and Scrap titles would overlap, you can use the context feature by separating them with folders. For example: ❯ tree scraps scraps ├── DDD │ └── Service.md └── Kubernetes └── Service.md Links to Scrap with different contexts can be specified like [[DDD/Service]], [[Kubernetes/Service]]. You can also combine them with Alias link such as [[Kubernetes/Service|Kubernetes Service]]. The context is also displayed on the Scrap detail page in the static site. Not Recommended Scraps aims for simple knowledge management, so overuse of folders should be avoided. Use folders (Context) only in cases such as: When duplicate Scrap titles occur across different contexts When a Scrap has a strong association with a specific context
-
GitHub-flavored Markdown
#Markdown Syntax As an extension, GitHub-flavored Markdown is also supported. This includes features such as strikethrough, tables, and task lists. Strikethrough: Markdown ~~This text is strikethrough.~~ Result This text is strikethrough. Task Lists: Markdown - [x] Task 1 - [ ] Task 2 - [ ] Task 3 Result Task 1 Task 2 Task 3
-
Templates
#Templates The template feature can be used by preparing Markdown files as templates under the templates/ directory, and it is implemented based on Tera, a template engine written in Rust. In templare feature of Scraps, you can mainly use Tera syntax and built-in functions. For more details, please refer to the Tera documentation. Scraps extension In addition to Tera’s syntax and built-ins, custom extensions can be implemented. Here are the custom extensions currently available in Scraps. Variables timezone You can use the timezone specified in Config.toml. {{ timezone }} As an example, use it as the timezone argument in the date filter. {{ now() | date(timezone=timezone) }} Please submit your extension requests to the Issue. Others For samples of templates using Tera, please refer to Scraps templates.
-
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
-
Mermaid
#Markdown Syntax By specifying mermaid as the language for a code block, you can use Mermaid diagrams. Markdown ```mermaid graph LR A --- B B-->C[fa:fa-ban forbidden] B-->D(fa:fa-spinner); ``` Result graph LR A --- B B-->C[fa:fa-ban forbidden] B-->D(fa:fa-spinner);
-
Internal link
#Markdown Syntax 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.
-
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
-
Alias link
#Internal link #Markdown Syntax Internal links allow you to use different display text as aliases. Writing [[Markdown Syntax|here]] creates a link that displays as here but links to the “Markdown Syntax” page.
-
Tag link
#Internal link #Markdown Syntax If there is no scraps with the specified title, such as #Markdown Syntax, 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.
-
Tag
#CLI ❯ scraps tag You can debug tag lists.