writefreely-config-hub-temp.../static/js
Andrei Jiroh Halili 6fef33de67
Initial commit
Contents were based on WriteFreely 0.13.1 release tarballs, might write an script
to automate this.

Signed-off-by: Andrei Jiroh Eugenio Halili <ajhalili2006@gmail.com>
2022-06-02 14:52:11 +08:00
..
highlightjs Initial commit 2022-06-02 14:52:11 +08:00
mathjax Initial commit 2022-06-02 14:52:11 +08:00
.gitignore Initial commit 2022-06-02 14:52:11 +08:00
README.md Initial commit 2022-06-02 14:52:11 +08:00
ace.js Initial commit 2022-06-02 14:52:11 +08:00
h.js Initial commit 2022-06-02 14:52:11 +08:00
highlight.min.js Initial commit 2022-06-02 14:52:11 +08:00
localdate.js Initial commit 2022-06-02 14:52:11 +08:00
menu.js Initial commit 2022-06-02 14:52:11 +08:00
modals.js Initial commit 2022-06-02 14:52:11 +08:00
mode-css.js Initial commit 2022-06-02 14:52:11 +08:00
postactions.js Initial commit 2022-06-02 14:52:11 +08:00
posts.js Initial commit 2022-06-02 14:52:11 +08:00
theme-chrome.js Initial commit 2022-06-02 14:52:11 +08:00
webfont.js Initial commit 2022-06-02 14:52:11 +08:00
webmonetization.js Initial commit 2022-06-02 14:52:11 +08:00
worker-css.js Initial commit 2022-06-02 14:52:11 +08:00

README.md

static/js

This directory is for Javascript.

Updating libraries

Update instructions, for libraries that involve more than just downloading the latest version.

highlightjs

To update the highlightjs library, first download a plain package (no languages included) from highlightjs.org. The highlight.pack.js file in the archive should be moved into this static/js/ directory and renamed to highlight.min.js.

Then download an archive of the latest version. Extract it to some directory, and replace ~/Downloads/highlight.js below with the resulting directory.

#!/bin/bash

version=9.13.1

cd $GOPATH/src/github.com/writefreely/writefreely/static/js/highlightjs
for f in $(ls ~/Downloads/highlight.js/src/languages); do
	# Use minified versions
	f=$(echo $f | sed 's/\.js/.min.js/')
	# Download the version
	wget "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/$version/languages/$f"
done

Commit the changes and you're done!