Permalink
Browse files

Convert to using a static webpage generator rather than Gollum

This commit changes the repository to be easily deployable as a
simple collection of .html/.css files.

Overall this means less dependence on a poorly maintained piece of wiki
software, and less obscure markdown deviations than those used by Gollum.
  • Loading branch information...
somasis committed Feb 2, 2017
1 parent ba3322b commit 97e74da19df8d016970d558f9e8b3bd674daaa55
View
@@ -1,2 +1,5 @@
*.tmp
*.html
*.min.css
*.bak
*~
View
@@ -4,7 +4,11 @@
rule 'MD007', :indent => 4 # four spaces for indentation
rule 'MD013', :code_blocks => false # don't check line length in code blocks
rule 'MD013', :tables => false # don't check line length in tables
rule 'MD013', :line_length => 100 # 100 length limit
rule 'MD026', :punctuation => ".,;:" # allow !? at header end
rule 'MD029', :style => :ordered # enforce incremental ordered lists
exclude_rule 'MD025' # allow multiple top level, for gollum h1 title
exclude_rule 'MD013'
exclude_rule 'MD022' # used by markdown.sh
exclude_rule 'MD025' # allow multiple top level, because we want to be in-depth in our doc
exclude_rule 'MD036' # allow emphasis "used instead of a header" because we're using emphasis without desire for a header
View
@@ -1,20 +1,37 @@
TRAVIS ?= false
# don't lint bugs-found-by-musl.md due to intentionally long line length
# requires discount markdown, postcss-cli, cssnano, htmltidy (html5), and autoprefixer
SRCDIR := $(realpath $(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
IMAGE ?= /srv/www/wiki.somasis.com
all: $(addsuffix .html,$(basename $(shell find -type f -name '*.md')))
all: $(addsuffix .min.css,$(basename $(shell find -type f -name '*.css' -and -not -name '*.min.css')))
clean:
find -type f -name '*.html' -delete -print
find -type f -name '*.min.css' -delete -print
find -type f -name '*.tmp' -delete -print
lint:
find . -type f -and -not -name 'bugs-found-by-musl.md' -and -not -name '_*' -and -name '*.md' -print0 | xargs -0 mdl -s .mdlstyle.rb
serve:
gollum --h1-title --user-icons gravatar --no-edit --no-live-preview --host 127.0.0.1 --css --adapter rugged
install:
@command -v gem >/dev/null 2>&1 || { echo "\`gem\` needs to be installed."; exit 1; }
@echo "This target will install dependencies need to lint the markdown files,"
@echo "and also locally run the wiki. If you do not want \`gem\` to install"
@echo "markdownlint, gollum, and rugged, press Ctrl-C."
@[ "$(TRAVIS)" = true ] || sleep 10
@[ "$(TRAVIS)" = true ] || command -v gollum >/dev/null 2>&1 || gem install --verbose --no-document gollum; exit $$?
@command -v mdl >/dev/null 2>&1 || gem install --verbose --no-document mdl; exit $$?
@[ "$(TRAVIS)" = true ] || ( gem list | grep -q "gollum-rugged_adapter" && exit $$? || exit 1 ) || gem install --verbose --no-document gollum-rugged_adapter; exit $$?
.PHONY: lint serve install
@find -type f -name '*.md' -and -not -name 'bugs-found-by-musl.md' -print0 | xargs -t0 mdl -s .mdlstyle.rb
# cssnano is ran separately because it likes to take out vendor prefixes we might still need
%.min.css: %.css
postcss -u cssnano "$*.css" -o "$*.css.tmp"
postcss -u autoprefixer "$*.css.tmp" -o "$*.min.css"
rm -f "$*.css.tmp"
%.html: %.md $(shell $(SRCDIR)/scripts/markdown.sh --template "$<" "$@")
$(SRCDIR)/scripts/markdown.sh "$<" "$@"
tidy -w 0 -utf8 -language en -i -m --show-info no "$@"
watch:
while true; do \
{ find . -not -name '*.min.css' -and -not -name '*.tmp' -and -not -name '*.html'; } | entr -c sh -c '$(MAKE) lint && $(MAKE)'; \
done
deploy: all
rm -f $(IMAGE)/Makefile $(shell find "$(IMAGE)" -type f -name '*.css' -and -not -name '*.min.css') $(shell find "$(IMAGE)" -type f -name '*.md' -or -name '*.theme' -or -name '*.tmp')
.PHONY: all clean deploy lint watch
View

This file was deleted.

Oops, something went wrong.
View
@@ -4,8 +4,6 @@ Resource list for alternative libraries and programs that are lightweight, not
bloated, efficient or have other useful design characteristics and may be
useable with musl.
[[_TOC_]]
# Alternative Libraries and Programs
- [pkgconf] Drop in replacement for pkg-config with no circular dependencies.
View
@@ -15,8 +15,6 @@ the perspective of root in /root.
[LightCube bootstrap environment]: https://github.com/jhuntwork/lightcube-bootstrap-musl
[[_TOC_]]
# Environment
Just set up a PM variable for use with make in order to have it take advantage
View
@@ -6,8 +6,6 @@ kernel style". The style guidelines which follow are descriptive rather than
prescriptive; they document what's currently in use in musl, and hopefully give
a feel for how new code should look.
[[_TOC_]]
# Indention
The indention style in musl distinguishes between "indention" and "alignment".
View
@@ -16,15 +16,15 @@ software packages.
## Compatibility with other implementations
- [[Functional differences from glibc]]
- [Functional differences from glibc]
- [Comparison] with other Linux libc implementations.
[Comparison]: https://www.etalabs.net/compare_libcs.html
## Software compatibility, patches and build instructions
- pkgsrc based software compatibility table:
- ~~[[Pkgsrc results]] (warning: very large wiki page, renders slowly)~~ Outdated.
- ~~Pkgsrc results~~ outdated.
- pkgsrc results are archived at <http://musl.codu.org>.
- The necessary patches are at [musl-pkgsrc-patches (hg)] or
[musl-pkgsrc-patches (git)].
@@ -35,7 +35,7 @@ software packages.
- [Alpine ports]
- [Gentoo overlay with musl support]
- See the packaging work in various other
[[distributions|Projects using musl#linux-distributions-using-musl]].
[distributions][Projects using musl#linux-distributions-using-musl].
[musl-pkgsrc-patches (hg)]: http://bitbucket.org/GregorR/musl-pkgsrc-patches
[musl-pkgsrc-patches (git)]: https://github.com/GregorR/musl-pkgsrc-patches
View
@@ -1,7 +1,5 @@
# Design Concepts
[[_TOC_]]
# Unified libc/libpthread/ldso
Not only does musl lack separate broken-down libraries like libpthread, libm,
@@ -160,7 +158,7 @@ loaded at the time of the call.
Before a new thread begins execution, TLS pointers are already setup, and the
TLS images have all been copied, for TLS belonging to libraries that were loaded
before the thread was created. If a thread attempts to access TLS in a library
that was loaded after the thread started, the __tls_get_addr function searches
that was loaded after the thread started, the \_\_tls_get_addr function searches
the list of loaded libraries to find the pre-allocated storage that was obtained
when the library was loaded, and uses an atomic-fetch-and-add operation to
adjust the index into this storage. This makes access to the pre-allocated
View
@@ -1,7 +1,5 @@
# Environment Variables
[[_TOC_]]
# PATH
Used by execvp, execlp, and posix_spawnp as specified in POSIX.
@@ -10,7 +8,7 @@ Used by execvp, execlp, and posix_spawnp as specified in POSIX.
Specifies the local timezone to be used for functions which deal with local
time. The value of TZ can be either a [POSIX timezone specification] in the form
stdoffset[dst[offset][,start[/time],end[/time]]] or the name of a
stdoffset[dst[offset][,start[/time],end[/time]] or the name of a
zoneinfo-binary-format timezone file (the form used by glibc and almost all
other systems). The zoneinfo file is interpreted as an absolute pathname if it
begins with a slash, a relative pathname if it begins with a dot, and otherwise
@@ -43,7 +41,7 @@ absolute or relative pathnames or filenames in the default library search path.
This variable is completely ignored in programs invoked setuid, setgid, or with
other elevated capabilities.
# LD_LIBRARY_PATH
# LD\_LIBRARY_PATH
Colon-separated list of pathnames that will be searched for shared libraries
requested without an explicit pathname. This path is searched prior to the
View
6 faq.md
@@ -1,13 +1,11 @@
# FAQ
[[_TOC_]]
# Q: lib[m|pthread|crypt].a/so are empty?
Yes, this is by design. musl puts everything into libc.a/so to avoid memory
bloat. The empty files are only there for compatibilit reasons. The official
explaination: <http://openwall.com/lists/musl/2012/07/25/3>
more info: [[Design Concepts]]
more info: [Design Concepts]
# Q: Why is there no `__MUSL__` macro?
@@ -172,7 +170,7 @@ math support).
# Q: Application XY misbehaves or crashes at runtime when linked against musl
Usually this is because the app has hardcoded glibc-specific assumptions or
wrong #ifdefs. See [[Functional differences from glibc]]. The most common causes
wrong #ifdefs. See [Functional differences from glibc]. The most common causes
are expectations of gnu getopt behaviour, iconv usage on UCS2 with assumptions
that BOM is processed and the byte order detected, assuming that off_t is 32
bit, and assumptions that pthread_create will create sufficiently large stacks
@@ -1,7 +1,5 @@
# Functional differences from glibc
[[_TOC_]]
# The stdio implementation
## printf behavior
View
@@ -2,8 +2,6 @@
To start using musl, you have three choices.
[[_TOC_]]
# Using the musl-gcc wrapper
This allows you to test and use musl on a glibc/uclibc system with no great
@@ -85,5 +83,5 @@ VFPv4.
If your distro uses musl natively, then naturally, anything compiled on that
distro will use musl. Several distros using musl, such as sabotage, are listed
on the [[Projects using musl page of this wiki|projects-using-musl]].
on the [Projects using musl page of this wiki][projects-using-musl].
View
@@ -5,46 +5,44 @@ maintained by the enthusiastic user community of musl. Some of musl's major
advantages over [glibc] and [uClibc]/[uClibc-ng] are its size, correctness,
static linking support, and clean code.
[[_TOC_]]
# Introduction
- [[Getting started]]
- [[FAQ]]
- [[Compatibility]] - software and standards compatibility of the API musl
- [Getting started]
- [FAQ]
- [Compatibility] - software and standards compatibility of the API musl
provides
- [[Supported Platforms]] - compilers, architectures, platforms, where musl works
- [[Projects using musl]] - Linux distributions and other projects using musl
- [[Contacts]] - mailing list, IRC, support, discussion
- [Supported Platforms] - compilers, architectures, platforms, where musl works
- [Projects using musl] - Linux distributions and other projects using musl
- [Contacts] - mailing list, IRC, support, discussion
# Using musl
- [Official documentation]
- [[Environment variables affecting musl|Environment variables]]
- [[Functional differences from glibc]]
- [[Guidelines for Distributions]]
- [Environment variables affecting musl][Environment variables]
- [Functional differences from glibc]
- [Guidelines for Distributions]
# Development
- [[Open issues]]
- [[Roadmap for post-1.0 development|Roadmap]]
- [[How to port musl to a new arch|Porting]]
- [[Ideas for future development|Future Ideas]]
- [[Design Concepts]]
- [[Coding Style]]
- [[Mathematical Library]]
- [Open issues]
- [Roadmap for post-1.0 development][Roadmap]
- [How to port musl to a new arch][Porting]
- [Ideas for future development][Future Ideas]
- [Design Concepts]
- [Coding Style]
- [Mathematical Library]
# Further reading
- [Comparison] with other Linux libc implementations
- [Install notes], [readme], and [release notes] in the official repo.
- [Generating cross compilers for musl][generating-cross] - also features
[pre-built cross compiler downloads][pre-built-cross] for different arches
- Lightweight [[alternatives to common libraries and software|Alternatives]]
- Lightweight [alternatives to common libraries and software][Alternatives]
that may be of interest in building small musl-based systems
- [[Bugs found by musl]] - mostly glibc and POSIX issues, some of them affect the
- [Bugs found by musl] - mostly glibc and POSIX issues, some of them affect the
development of musl
- [[Building Busybox]] explains how to build Busybox 1.22.1 against musl (and
- [Building Busybox] explains how to build Busybox 1.22.1 against musl (and
kernel header compatibility in general)
[musl]: https://www.musl-libc.org/
View
@@ -6,20 +6,26 @@ url.redirect = (
"^/latest_changes(.*)$" => "https://github.com/somasis/musl-wiki/commits/master",
# Redirect urls used by the old mediawiki
"^/wiki/Main_Page" => "/home",
"^/wiki/Getting_started" => "/getting-started",
"^/wiki/Supported_Platforms" => "/supported-platforms",
"^/wiki/Projects_using_musl" => "/projects-using-musl",
"^/wiki/Environment_Variables" => "/environment-variables",
"^/wiki/Functional_differences_from_glibc" => "/functional-differences-from-glibc",
"^/wiki/Guidelines_for_Distributions" => "/guidelines-for-distributions",
"^/wiki/Open_Issues" => "/open-issues",
"^/wiki/Future_Ideas" => "/future-ideas",
"^/wiki/Design_Concepts" => "/design-concepts",
"^/wiki/Coding_Style" => "/coding-style",
"^/wiki/Mathematical_Library" => "/mathematical-library",
"^/wiki/Alternative_libraries" => "/alternatives",
"^/wiki/Bugs_found_by_musl" => "/bugs-found-by-musl",
"^/wiki/Building_Busybox" => "/building-busybox",
"^/wiki/(.*)$" => "/$1",
"^/home" => "/index.html",
"^/wiki/Main_Page" => "/index.html",
"^/wiki/Getting_started" => "/getting-started.html",
"^/wiki/Supported_Platforms" => "/supported-platforms.html",
"^/wiki/Projects_using_musl" => "/projects-using-musl.html",
"^/wiki/Environment_Variables" => "/environment-variables.html",
"^/wiki/Functional_differences_from_glibc" => "/functional-differences-from-glibc.html",
"^/wiki/Guidelines_for_Distributions" => "/guidelines-for-distributions.html",
"^/wiki/Open_Issues" => "/open-issues.html",
"^/wiki/Future_Ideas" => "/future-ideas.html",
"^/wiki/Design_Concepts" => "/design-concepts.html",
"^/wiki/Coding_Style" => "/coding-style.html",
"^/wiki/Mathematical_Library" => "/mathematical-library.html",
"^/wiki/Alternative_libraries" => "/alternatives.html",
"^/wiki/Bugs_found_by_musl" => "/bugs-found-by-musl.html",
"^/wiki/Building_Busybox" => "/building-busybox.html",
"^/wiki/(.*)$" => "/$1.html",
)
url.rewrite-if-not-file = (
"^([^?]*)$" => "$1.html"
)
Oops, something went wrong.

0 comments on commit 97e74da

Please sign in to comment.