{"id":15027830,"url":"https://github.com/inkproject/ink","last_synced_at":"2025-05-14T19:03:12.324Z","repository":{"id":27319426,"uuid":"30793774","full_name":"InkProject/ink","owner":"InkProject","description":"An elegant static blog generator","archived":false,"fork":false,"pushed_at":"2025-03-13T03:19:55.000Z","size":17096,"stargazers_count":1086,"open_issues_count":9,"forks_count":119,"subscribers_count":44,"default_branch":"master","last_synced_at":"2025-04-08T11:06:39.453Z","etag":null,"topics":["blog-engine","golang","javascript","static-site-generator"],"latest_commit_sha":null,"homepage":"https://inkproject.github.io/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InkProject.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-02-14T10:33:42.000Z","updated_at":"2025-03-16T23:06:01.000Z","dependencies_parsed_at":"2024-03-13T06:30:02.990Z","dependency_job_id":"3e802031-afd4-472c-8a72-e403f5aeeb5f","html_url":"https://github.com/InkProject/ink","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InkProject%2Fink","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InkProject%2Fink/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InkProject%2Fink/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InkProject%2Fink/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InkProject","download_url":"https://codeload.github.com/InkProject/ink/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247829490,"owners_count":21002995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blog-engine","golang","javascript","static-site-generator"],"created_at":"2024-09-24T20:07:07.899Z","updated_at":"2025-04-08T11:06:53.575Z","avatar_url":"https://github.com/InkProject.png","language":"Go","readme":"## Introduction\n\nInkPaper is a static blog generator developed in Golang. No dependencies, cross platform, easy to use, fast building times and an elegant theme.\n\n[![apm](https://img.shields.io/badge/license-CC%20BY--NC%204.0-blue.svg)](https://creativecommons.org/licenses/by-nc/4.0/)\n\n![InkPaper - An Elegant Static Blog Generator](template/source/images/example-en.png)\n\n### Features\n- YAML format configuration\n- Markdown format articles\n- No dependencies, cross platform\n- Super fast build times\n- Continuously improving theme and typography\n- Multiple article authors support\n- Archive and tag generation\n- Real-time preview when saving\n- Offline full-text keyword search\n- $\\LaTeX$ style math formula support (MathJax):\n\n$$\n\\int_{-\\infty}^\\infty g(x) dx = \\frac{1}{2\\pi i} \\oint_{\\gamma} \\frac{f(z)}{z-g(x)} dz\n$$\n\n### Quick Start\n- Download \u0026 Extract [Ink](https://github.com/InkProject/ink/releases) and run `ink preview`\n\n  \u003e Tip：Linux/macOS, use `./ink preview`\n\n- Open `http://localhost:8000` in your browser to preview\n\n### Website Configuration\nEdit `config.yml`, use this format:\n\n``` yaml\nsite:\n    title: Website Title\n    subtitle: Website Subtitle\n    limit: Max Article Count Per Page\n    theme: Website Theme Directory\n    comment: Comment Plugin Variable (Default is disqus username)\n    root: Website Root Path # Optional\n    lang: Website Language # Support en, zh, ru, ja, de, pt-br, configurable in theme/lang.yml\n    url: Website URL # For RSS generating\n    link: Article Link Scheme # Default is {title}.html, Support {year}, {month}, {day}, {hour}, {minute}, {second}, {title} variables\n\nauthors:\n    AuthorID: # Your author ID, used in article's author field\n        name: Author Name\n        intro: Author Motto\n        avatar: Author Avatar Path\n\nbuild:\n    output: Build Output Directory # Optional, default is \"public\"\n    port: Preview Port\n    copy:\n        - Copied Files When Build\n    publish: |\n        Excuted command when 'ink publish' is used\n```\n\n### Blog Writing\nCreate a `.md` file in the `source` directory (Supports subdirectories). Use this format:\n\n``` yaml\ntitle: Article Title\ndate: Year-Month-Day Hour:Minute:Second #Created Time. Support timezone, such as \" +0800\"\nupdate: Year-Month-Day Hour:Minute:Second #Updated Time, optional. Support timezone, such as \" +0800\"\nauthor: AuthorID\ncover: Article Cover Path # Optional\ndraft: false # Is draft or not, optional\ntop: false # Place article to top or not, optional\npreview: Article Preview, Also use \u003c!--more--\u003e to split in body # Optional\ntags: # Optional\n    - Tag1\n    - Tag2\ntype: post # Specify type is post or page, optional\nhide: false # Hide article or not. Hidden atricles still can be accessed via URL, optional\ntoc: false # Show table of contents or not, optional\n---\n\nMarkdown Format's Body\n```\n\n### Publish\n- Run `ink publish` in the blog directory to automatically build and publish\n- Or run `ink build` to manually deploy generated `public` directory\n\n\u003e **Tips**: When files changed, `ink preview` will automatically rebuild the blog. Refresh browser to update.\n\n## Customization\n\n### Modifying The Theme\n\nThe default theme is placed in the `theme` folder, run `npm install` and `npm run build` to rebuild in this folder.\n\npage `page.html` (article list) and `article.html` (article), use variable with [Golang Template](http://golang.org/pkg/html/template/) syntax.\n\n### New Page\n\nCreated any `.html` file will be copied to `source` directory, could use all variables on `site` field in `config.yml`.\n\n\n#### Define Custom Variables\nInkPaper supports defining custom variables in pages, which must be placed under `site.config` in `config.yaml`, such as:\n\n``` yaml\nsite:\n    config:\n        MyVar: \"Hello World\"\n```\n\nThe variable can be referenced in the page by `{{.Site.Config.MyVar}}`.\n\n\u003e **Note**\n\u003e\n\u003e Although the field names in other parts of `config.yaml` are all lowercase, the name of the custom variable must be used correctly. Otherwises, such a variable:\n\u003e\n\u003e ```yaml\n\u003e site:\n\u003e     config:\n\u003e         MYVAR_aAa: \"Hello World\"\n\u003e ```\n\u003e must be referenced in the page as `{{.Site.Config.MYVAR_aAa}}`.\n\n#### Use Functions (Experimental)\n\nInkPaper defines a minimal set of functions that can be used in HTML pages (except for `.md` source files), such as\n\n``` yaml\n{{ readFile \"path/to/file\" }}\n```\n\nThis will read the content of the file `path/to/file` and include it in the page without any processing.\n\nFor file-related functions, when executed in the `source` directory, the file path is relative to the `source` directory; when executed in other directories, the file path is relative to the theme (such as `theme`).\n\nSee the source file `funcs.go` for a list of all functions.\n\n### Blog Migration (Beta)\n\nSupports simple Jeklly/Hexo post convertions. Usage:\n\n``` shell\nink convert /path/_posts\n```\n\n### Building from source\n\n**Local Build**\n\n1. Install [Golang](http://golang.org/doc/install) environment\n2. Run `git clone https://github.com/InkProject/ink \u0026\u0026 cd ink \u0026\u0026 go install` to compile and install ink\n3. Run `ink preview $GOPATH/src/github.com/InkProject/ink/template` to preview blog\n\n**Docker Build (Example)**\n\n1. Clone code `git clone git@github.com:InkProject/ink.git`\n2. Build image `docker build -t ink .` in source directory\n3. Run container `docker run -p 8888:80 ink`\n\n## Theme\n\n- Dark (Official Theme): [https://github.com/InkProject/ink-theme-dark](https://github.com/InkProject/ink-theme-dark)\n- Simple: [https://github.com/myiq/ink-simple](https://github.com/myiq/ink-simple)\n- Story: [https://github.com/akkuman/ink-theme-story](https://github.com/akkuman/ink-theme-story)\n- Material2: [https://github.com/w568w/InkMaterialTheme](https://github.com/w568w/InkMaterialTheme)\n\n## Related Tutorials\n\n- [Automatically deploy your Ink blog to GitHub pages with Travis CI](http://www.shery.me/blog/travis-ci.html)\n\n## License\n[CC Attribution-NonCommercial License 4.0](https://creativecommons.org/licenses/by-nc/4.0/)\n\n## Reporting An Issue\n\n[https://github.com/InkProject/ink/issues](https://github.com/InkProject/ink/issues)\n\n## These blogs are driven by InkPaper\n\n- [https://imeoer.github.io/blog/](https://imeoer.github.io/blog/)\n- [http://blog.hyper.sh/](http://blog.hyper.sh/)\n- [http://wangxu.me/](http://wangxu.me/)\n- [http://whzecomjm.com/](http://whzecomjm.com/)\n- [http://www.shery.me/blog/](http://www.shery.me/blog/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finkproject%2Fink","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finkproject%2Fink","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finkproject%2Fink/lists"}