• Stars
    star
    853
  • Rank 51,399 (Top 2 %)
  • Language
    Julia
  • License
    MIT License
  • Created almost 6 years ago
  • Updated 10 months ago

Reviews

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

Repository Details

(yet another) static site generator. Simple, customisable, fast, maths with KaTeX, code evaluation, optional pre-rendering, in Julia.

Franklin: a Static Site Generator in Julia.

Lifecycle Build Status Coverage

Franklin is a simple static site generator (SSG) oriented towards technical blogging (code, maths, ...), flexibility and extensibility. The base syntax is plain markdown with a few extensions such as the ability to define and use LaTeX-like commands in or outside of maths environments and the possibility to evaluate code blocks on the fly.

Franklin has a channel #franklin on the Julia slack, this is the best place to ask usage questions.

Note: I'm looking for people with web-dev chops who would be keen to help improve and enrich the base themes available at FranklinTemplates.jl, even if you're not super confident in Julia. More generally, if you would like to work on something or fix something in either Franklin or FranklinTemplates, please reach out on Slack, I will gladly help you get started.

Docs

Go to Franklin's main website. For users already familiar with Franklin you might also find these demos useful. Ifihan Olusheye also wrote this blog on building a blog with Franklin.

Important notes

  • if, upon deployment, your website doesn't seem to apply CSS, you likely forgot a step, please see here.
  • it is currently recommended to switch off pre-rendering and minification (you can do this by passing prerender=false, minify=false to the optimize(...) call in your deploy script), the corresponding logic will be removed in future version of Franklin as it's tricky to maintain and caused too many issues.
  • if you're getting warning messages about some JS library not being found on your computer, you can safely ignore this.

Key features

  • Use standard markdown with the possibility to use LaTeX-style commands and generating functions written in Julia
  • Simple way to introduce div blocks allowing easy styling on a page (e.g. "Theorem" boxes etc.),
  • Can execute and show the output of Julia code blocks,
  • Easy HTML templating to define or adapt a given layout,
  • Custom RSS generation,
  • Simple website optimisation step:
    • compression of HTML and CSS of the generated pages,
    • optional pre-rendering of KaTeX and highlighted code blocks to remove javascript dependency,
  • Extremely flexible and extensible.

See the docs for more information and examples.

Examples

Some examples of websites using Franklin (if you're using Franklin with a public repo, consider adding the "franklin" tag to the repo to help others find examples, thanks!)

Adapted templates (i.e. starting from one of the available themes)

Custom templates (i.e. migrating an existing design)

Getting started

With Julia β‰₯ 1.3:

pkg> add Franklin

you can then get started with

julia> using Franklin

julia> newsite("MyNewSite")
βœ” Website folder generated at "MyNewSite" (now the current directory).
β†’ Use serve() from Franklin to see the website in your browser.

julia> serve()
β†’ Initial full pass...
β†’ Starting the server...
βœ” LiveServer listening on http://localhost:8000/ ...
  (use CTRL+C to shut down)

Modify the files in MyNewSite/src and see the changes being live-rendered in your browser. Head to the docs for more information.

You can also start from one of the templates by doing something like:

julia> newsite("MyNewSite", template="vela")

You might want to put the following command in your .bash_profile or .bashrc as a way to quickly launch the server from your terminal:

alias franklin=julia -O0 -e 'using Franklin; serve()'

Heads up!

While Franklin broadly supports standard Markdown there are a few things that may trip you which are either due to Franklin or due to Julia's Markdown library, here are key ones you should keep in mind:

  • when writing a list, the content of the list item must be on a single line (no line break)
  • you can write comments with <!-- comments --> the comment markers <!-- and --> must be separated by a character that is not a - to work properly so <!--A--> is ok but <!---A---> is not, best is to just systematically use whitespace: <!-- A -->.
  • be careful writing double braces, {{...}} has a meaning (html functions) this can cause issues in latex commands, if you have double braces in a latex command, make sure to add whitespaces for instance write \dfrac{1}{ {101}_{2} } instead of \dfrac{1}{{101}_{2}}. In general use whitespaces liberally to help the parser in math and latex commands.
  • (as of v0.7) code blocks should be delimited with backticks ` you can also use indented blocks to delimit code blocks but you now have to opt in explicitly on pages that would use them by using @def indented_code = true, if you want to use that everywhere, write that in the config.md. Note that indented blocks are ambiguous with some of the other things that Franklin provides (div blocks, latex commands) and so if you use them, you are responsible for avoiding ambiguities (effectively that means not using indentation for anything else than code)

Associated repositories

Licenses

Core:

  • Franklin, FranklinTemplates and LiveServer are all MIT licensed.

External:

More Repositories

1

PkgPage.jl

Create a beautiful landing page for your package in less than 10 minutes.
CSS
113
star
2

LiveServer.jl

Simple development server with live-reload capability for Julia.
Julia
112
star
3

FranklinTemplates.jl

Simple website templates for Franklin.jl
CSS
70
star
4

Xranklin.jl

Experimental repo for a refactoring of Franklin.jl
Julia
39
star
5

JSXGraph.jl

[wip] Julia bridge to JSXGraph for interactive plots
HTML
16
star
6

EPBP

Expectation Particle Belief Propagation code
Julia
11
star
7

GPlot.jl

[WIP] Fast 2D-3D publication-quality plotting with LaTeX support in Julia via the Graphics Layout Engine
Julia
10
star
8

tlienart.github.io

Code for my website, powered by Franklin.jl
JavaScript
9
star
9

ft-academic-resume

draft Franklin template for the academic template
Julia
9
star
10

AnalyticalEngine.jl

[draft] Agnostic Machine Learning models working on CPUs, GPUs, distributed architecture, etc.
Julia
6
star
11

tex2jem

Convert a .tex file into Jem-style (simple markdown) HTML
Python
5
star
12

ExpFamily.jl

A package to handle Exponential Family distributions
Julia
5
star
13

SMC.jl

Sequential Monte Carlo methods in Julia (experimental)
Julia
4
star
14

PlusPlus.jl

++ as array vcat and string concat
Julia
4
star
15

EPInference.jl

A package to perform EP inference in a variety of settings
Julia
4
star
16

franklindocs

Website for Franklin.jl
HTML
4
star
17

coder-xranklin-demo

JavaScript
2
star
18

SimpleParser.jl

A (really) simple parser in Julia (edit: all that's in there has been integrated into Franklin.jl)
Julia
2
star
19

Tutorialist.jl

[draft] create a website for tutorials; worry about the content not the layout
HTML
2
star
20

FranklinUtils.jl

Barebones utility package to help with writing lx functions or h functions with Franklin.jl
Julia
2
star
21

DistillTemplate

[wip] Port of the distill template to Franklin
JavaScript
2
star
22

TuringLearnDraft.jl

Julia
1
star
23

demo-soilwater.jl

Julia
1
star
24

papers

[ongoing] a list of (good) papers that I've read and may want to refer back to
1
star
25

ft-forty

CSS
1
star
26

demoplotsgallery

JavaScript
1
star
27

FranklinPluginExample.jl

Julia
1
star
28

JuDocExample

HTML
1
star
29

ftest

CSS
1
star
30

fred

CSS
1
star
31

smsetup

Rough scripts to setup a sagemaker notebook
Julia
1
star
32

FranklinFAQ

FAQ/demos for Franklin
CSS
1
star
33

julia-blog-migration

translation of some julia blog posts in JuDoc
HTML
1
star
34

booksjl-franklin

JavaScript
1
star
35

julia-site

Copy of https://julialang.org/ using Franklin.jl (WIP POC)
Jupyter Notebook
1
star
36

ConstrainedPDMP

Notebook to reproduce the results presented in the paper "PDMP for Scalable Monte Carlo on Restricted Domains"
Jupyter Notebook
1
star
37

juliagpu

migration of the juliagpu website to franklin
JavaScript
1
star
38

cppds

CSS
1
star