Skip to content

Commit

Permalink
Merge pull request #4 from life4/clone
Browse files Browse the repository at this point in the history
Rewrite everything
  • Loading branch information
orsinium authored Mar 30, 2021
2 parents fc02958 + bfd95d1 commit 8d5da51
Show file tree
Hide file tree
Showing 75 changed files with 2,417 additions and 881 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# ignore binaries
chameleon
config.toml
.storage
/.storage/
.mypy_cache/
chameleon.tar.gz
/.repo/
/.database.bin
/.task/
27 changes: 27 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
linters:
disable-all: true
# https://golangci-lint.run/usage/linters/
enable:
- gosimple
- deadcode
- ineffassign
- asciicheck
- dogsled
- exhaustive
- exportloopref
- gocritic
- gofmt
- golint
- prealloc
- lll
- sqlclosecheck
- tparallel
- unconvert

linters-settings:
gocritic:
disabled-checks:
- exitAfterDefer
- ifElseChain
lll:
line-length: 100
38 changes: 24 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
# Chameleon

Chameleon is web application that reflects content from markdown files from Github. Powers [articles.orsinium.dev](https://articles.orsinium.dev/).
Chameleon is web application (blog engine) that reflects content from markdown files from a git repository. Powers [articles.orsinium.dev](https://articles.orsinium.dev/).

## Run from release
Features:

1. [Download release](https://github.com/orsinium/chameleon/releases).
2. Extract: `tar -xzf chameleon.tar.gz`
3. Edit config: `nano config.toml`
4. Run binary release for your platform: `./linux-amd64.bin`
+ Markdown
+ Minimalistic UI
+ Easy to use, no CI or a special repo structure required
+ Zero configuration
+ Single binary
+ Automatically pull the repo by schedule
+ Built-in prose linter ([Vale](https://github.com/errata-ai/vale))
+ Syntax highlighting ([Prism](https://prismjs.com/))
+ Formulas ([MathJax](https://www.mathjax.org/))
+ Emoji ([enescakir/emoji](https://github.com/enescakir/emoji))
+ Views count
+ Great performance and server-side caching
+ Optional password protection
+ Search
+ Minification ([minify](https://github.com/tdewolff/minify#examples))

## Run from source
## Usage

Build:

```bash
git clone https://github.com/orsinium/chameleon
git clone https://github.com/life4/chameleon.git
cd chameleon
cp config{_example,}.toml
go get .
go run *.go
go build -o chameleon.bin .
```

## Run from build
Run:

```bash
go build .
./chameleon
./chameleon.bin --path ./path/to/repo/
```
10 changes: 10 additions & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# https://taskfile.dev/
version: "3"

tasks:
go:run:
sources:
- chameleon/
- main.go
cmds:
- go run .
174 changes: 0 additions & 174 deletions article.go

This file was deleted.

26 changes: 0 additions & 26 deletions build.py

This file was deleted.

88 changes: 0 additions & 88 deletions category.go

This file was deleted.

Loading

0 comments on commit 8d5da51

Please sign in to comment.