• This repository has been archived on 19/Dec/2023
  • Stars
    star
    166
  • Rank 220,655 (Top 5 %)
  • Language
    JavaScript
  • License
    Other
  • Created about 10 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Instant and elegant Markdown documents in the browser, Git powered markdown wiki server, mathjax and theme support, and many more features!

Strapdown-Zeta - Git powered Wiki for Hackers!

Join the chat at https://gitter.im/chaitin/strapdown-zeta

Build Status

Strapdown-Zeta is a git-powered wiki system for hackers, derived from strapdown.js project.

Strapdown.js makes it embarrassingly simple to create elegant Markdown documents. No server-side compilation required.

Strapdown-Zeta add more features including a standalone server providing a git powered wiki system, on top of libgit2, we don't want any potential command injections!

Features

Strapdown Static Markdown Page

  • Search Engine friendly.
  • Cross-browser compatible and responsive in mobile screens.
  • GitHub flavored Markdown syntax.
  • MathJax support. Feel free to type in your awesome math equations.
  • Theme switchable. 15 Bootstrap themes included by default, you can add more as you wish. And everybody can switch the theme thru one click.
  • Table of Content auto generation. Just specify toc="true" in the xmp tag
  • Heading numbering and anchor support, just one click will bring you to the section you are going to.
  • Use highlight.js for syntax highlighting, which provides more beautiful coloring and more powerful syntax parsing.
  • Blazing fast loading speed! All the codes are written using vanilla-js, only less than 200KiB source code after compressing.

Git powered Wiki

  • Git Powered Wiki system. A standalone server is provided, just git init then run the server will get you a full functional geeky wiki server.
  • File modification history and view by commit version(shortened sha hash).
  • Custom view options can be specified for different files.
  • Handle of static files. Directory listing can be turned on and off.
  • HTTP Authentication.

For more, please see:

Usage

Use Strapdown static html

Open your favorite text editor, paste the following lines into the text, then type markdown content in the middle, save the file as test.html, and open it, here you go!

<!DOCTYPE html> <html> <title>Hello, Strapdown</title> <meta charset="utf-8"> <xmp theme="cerulean" style="display:none;">

# title

your awesome markdown content goes here...

</xmp> <script src="http://cdn.ztx.io/strapdown/strapdown.min.js"></script> </html>

Alternatively use src attribute

You can points to an external script file through the src attribute:

<!DOCTYPE html> <html> <title>Hello, Strapdown</title> <meta charset="utf-8">
<xmp theme="cerulean" style="display:none;" src="content.md">
</xmp> <script src="http://cdn.ztx.io/strapdown/strapdown.min.js"></script> </html>

(in this example we display parsed content.md file located at same path).

src attribute specifies the URL of an external markdown file.

It should be placed on same domain because of web browsers same-origin policy.

Choose theme

You can set your favorite theme in xmp tag. The following themes are built-in by default.

  • Chaitin
  • Amelia
  • Bootstrap
  • Cerulean
  • Cosmo
  • Cyborg
  • Flatly
  • Journal
  • Readable
  • Simplex
  • Slate
  • Spacelab
  • Spruce
  • Superhero
  • United

To use Cosmo, use the following line

<!DOCTYPE html> <html> <title>Hello, Strapdown</title> <meta charset="utf-8"> <xmp theme="cosmo" style="display:none;">

your awesome markdown content goes here...

</xmp> <script src="http://cdn.ztx.io/strapdown/strapdown.min.js"></script> </html>

Table of Content

To generate table of content, specify toc="true" in xmp tag.

<!DOCTYPE html> <html> <title>Hello, Strapdown</title> <meta charset="utf-8"> <xmp theme="cosmo" toc="true" style="display:none;">

your awesome markdown content goes here...

</xmp> <script src="http://cdn.ztx.io/strapdown/strapdown.min.js"></script> </html>

Strapdown Server

The server supports the following parameters.

  • -addr="0.0.0.0", specify the listening host:port tuple, multiple addresses can be specified by separation of comma, e.g. 192.168.1.10:8080,127.0.0.1:8080.
  • -init, do automatic git init before starting the server, if git repo not found in working directory.
  • -dir=/path/to/dir, use the directory as the root of the git powered wiki.
  • -title=MyTitle, specify the default title of Wiki
  • -auth=.htpasswd, specify the authentication file to use, htpasswd format
  • -heading_number=true|false, set default value for whether to show heading numbers
  • -toc=true|false, set default value for whether to show table of content
  • -host=some.domain.com, the default hosting of strapdown static files
  • -theme=cerulean|cosmo|..., the default theme to use

Installation

For normal users

Standalone downloadable binary can be downloaded at https://github.com/chaitin/strapdown-zeta/releases

For hackers

You can hack this project any way you want. Please follow the following build instructions to get started.

Build

build strapdown.min.js and strapdown.min.css

$ npm install
$ grunt

The generated file would be build/strapdown.min.js and build/strapdown.min.css

Build strapdown server

The server can be built into a single standalone binary.

The server is written using go programming language.

First, you need to install go dependency libraries.

$ make -C server deps

After that, just run make in server directory.

$ cd server
$ make

or just do following in project root directory, both will work!

$ make -C server all

Usage

Just copy the strapdown-server binary to anywhere you want and run the server with proper parameters.

examples here:

$ mkdir -p /home/wiki
$ strapdown-server -dir /home/wiki -init -addr 127.0.0.1:8080

Or,you can run in docker:

$ mkdir -p /home/wiki
$ docker build . -t wiki
$ docker run -d -p 8080:8080 -v /home/wiki:/wiki wiki -dir /wiki -init -addr :8080

Note

The server relies on /etc/mime.types to correctly detect file mime types. So make sure /etc/mime.types exists.

for Mac OSX users, the file is builtin.

For Archlinux users, install mime-types

$ pacman -S mime-types

For other Linux distributions, install apache server will also help.

Systemd script

To run this server using systemd, copy the strapdown.service file into your /etc/systemd/system/ directory and systemctl start strapdown

License

This project use SATA License (Star And Thank Author License), so you have to star this project before using. Read the license carefully.

Credits

All credit goes to the projects below that make up most of Strapdown.js:

Contributor

More Repositories

1

xray

一款完善的安全评估工具,支持常见 web 安全问题扫描和自定义 poc | 使用之前务必先阅读文档
Vue
9,727
star
2

SafeLine

一款足够简单、足够好用、足够强的免费 WAF。基于业界领先的语义引擎检测技术,作为反向代理接入,保护你的网站不受黑客攻击。 A free WAF that is sufficiently simple, effective, and powerful. Utilizing industry-leading semantic engine detection technology, it operates as a reverse proxy to protect your website from hacker attacks.
C++
8,603
star
3

passionfruit

[WIP] Crappy iOS app analyzer
Vue
1,657
star
4

veinmind-tools

veinmind-tools 是由长亭科技自研,基于 veinmind-sdk 打造的容器安全工具集
Go
1,470
star
5

rad

1,382
star
6

xpoc

为供应链漏洞扫描设计的快速应急响应工具 [快速应急] [漏洞扫描] [端口扫描] [xray2.0进行时] A fast emergency response tool designed for supply chain vulnerability scanning.
855
star
7

cloudwalker

CloudWalker Platform
Go
664
star
8

blazehttp

可用于安全测试的非标准HTTP协议解析库
Go
358
star
9

sqlchop

[DEPRECATED]A novel SQL injection detection engine built on top of SQL tokenizing and syntax analysis.
249
star
10

collie

牧云社区版
TypeScript
128
star
11

libveinmind

一个由长亭自研,直观而可扩展的容器安全 SDK
Go
115
star
12

Real-World-CTF-6th-Challenges

attachments and (some) writeups/source code for RWCTF 6th
100
star
13

pro

A crappy tool used in our private PS4 jailbreak
Python
99
star
14

xtools

JavaScript
92
star
15

yanshi

A regular language recognizer generater like Ragel, enhanced with features to approximate context-free grammars and substring grammars
C++
90
star
16

Real-World-CTF-3rd-Challenge-Attachments

Challenge attachments for RWCTF 3rd.
90
star
17

safeline-open-platform

Lua
87
star
18

log4j2-vaccine

log4j2-vaccine
Java
85
star
19

django-pg-partitioning

A Django extension that supports PostgreSQL 11 time ranges and list partitioning.
Python
77
star
20

mimicry

Mimicry is a dynamic deception tool that actively deceives an attacker during exploitation and post-exploitation.
Dockerfile
55
star
21

Real-World-CTF-5th-Challenges

attachments and (some) writeups/source code for RWCTF 5th
Python
52
star
22

lua-resty-t1k

Lua implementation of the T1K protocol for Chaitin/SafeLine WAF
Perl
45
star
23

Real-World-CTF-3rd-Forum-Attachments

attachments for forum of RealWorld CTF 3rd
C
40
star
24

sqlchop-http-proxy

SQLChop reverse http proxy module
JavaScript
32
star
25

Real-World-CTF-4th-Challenge-Attachments

26
star
26

Real-World-CTF-2019-Quals-Attachment

23
star
27

systracer

SysTracer: Linux 系统活动跟踪器
Go
22
star
28

gamma

16
star
29

xray_document

HTML
15
star
30

duty.html

A single page for daily duty assignment
HTML
12
star
31

querystring

Parse and stringify URL query strings
TypeScript
12
star
32

veinmind-action

基于 veinmind-tools 实现的 Github Action
Dockerfile
8
star
33

collie-app-cli

本地使用 Collie 应用或开发 Collie 应用的 CLI 工具
Rust
7
star
34

telewriter

Another jQuery typing animation script.
JavaScript
7
star
35

veinmind-jenkins

Groovy
3
star
36

veinmind-common-go

Go
2
star
37

browserslist-config-monster

JavaScript
2
star
38

veinmind-orb

1
star
39

xray-docs

MDX
1
star