Highlight code written in more than 160 languages.
After Dark uses a customized version of One Dark Syntax to produce print-friendly code highlighting for more than 160 languages.
.card-content .inner { overflow: scroll; height: 200px; } Supported Languages ABNF, ANTLR, APL, ActionScript, ActionScript 3, Ada, Angular2, ApacheConf, AppleScript, Arduino, Awk, BNF, Ballerina, Base Makefile, Bash, Batchfile, BlitzBasic, Brainfuck, C, C#, C++, CFEngine3, CMake, COBOL, CSS, Cap'n Proto, Ceylon, ChaiScript, Cheetah, Clojure, CoffeeScript, Common Lisp, Coq, Crystal, Cython, DTD, Dart, Diff, Django/Jinja, Docker, EBNF, Elixir, Elm, EmacsLisp, Erlang, FSharp, Factor, Fish, Forth, Fortran, GAS, GDScript, GLSL, Genshi, Genshi HTML, Genshi Text, Gnuplot, Go, Go HTML Template, Go Text Template, Graphql, Groovy, HTML, HTTP, Handlebars, Haskell, Haxe, Hexdump, Hy, INI, Idris, Io, JSON, JSX, Java, JavaScript, Julia, Kotlin, LLVM, Lighttpd configuration file, Lua, Mako, Mason, Mathematica, Matlab, MiniZinc, Modula-2, MorrowindScript, MySQL, Myghty, NASM, Newspeak, Nginx configuration file, Nim, Nix, OCaml, Objective-C, Octave, Org Mode, PHP, PL/pgSQL, POVRay, PacmanConf, Perl, Pig, PkgConfig, PostScript, PostgreSQL SQL dialect, PowerShell, Prolog, Protocol Buffer, Puppet, Python, Python 3, QBasic, R, Racket, Ragel, Rexx, Ruby, Rust, SCSS, SPARQL, SQL, Sass, Scala, Scheme, Scilab, Smalltalk, Smarty, Snobol, Solidity, SquidConf, Swift, TASM, TOML, Tcl, Tcsh, TeX, Termcap, Terminfo, Terraform, Thrift, Transact-SQL, Turing, Turtle, Twig, TypeScript, TypoScript, TypoScriptCssData, TypoScriptHtmlData, VHDL, VimL, WDTE, XML, Xorg, YAML, cfstatement, markdown, reStructuredText, reg, systemverilog, verilog To activate the highlighter indicate the highlighting language in a fenced code block within your markdown:
Maximize resources while minimizing external requests.
After Dark makes JIT requests for some external assets to cut down on resource consumption and increase page performance.
Take the Code Highlighter stylesheet for example:
.highlight,pre.highlight{background:#000;color:#abb2bf}.highlight pre{background:#000}.highlight .ge{font-style:italic}.highlight .gs{font-weight:700}.highlight .ow{font-weight:700}.highlight .n,.highlight .nf,.highlight .nn,.highlight .o,.highlight .p{color:#abb2bf}.highlight .c,.highlight .c1,.highlight .cm,.highlight .cp,.highlight .cs{color:#5c6370;font-style:italic}.highlight .sr,.highlight .ss{color:#56b6c2}.highlight .k,.highlight .kc,.highlight .kd,.highlight .kn,.highlight .kp,.highlight .kr,.highlight .kt{color:#c678dd}.highlight .l,.highlight .ld,.highlight .s,.highlight .s1,.highlight .s2,.highlight .sb,.highlight .sc,.highlight .sd,.highlight .se,.highlight .sh,.highlight .si,.highlight .sx{color:#98c379}.highlight .nt,.highlight .nx,.highlight .vi{color:#e06c75}.highlight .il,.highlight .m,.highlight .mf,.highlight .mh,.highlight .mi,.highlight .
Create human and machine readable bylines in posts.
After Dark creates rich post bylines automatically. Bylines include optional author name, word count, links to Taxonomy Pages and Structured Data.
Example Byline Published [by `author`] [`publishdate` or `date`] in [navigation](/categories/navigation) and tagged [links](/tags/links) and [taxonomy](/tags/taxonomy) using [`wordcount`] words. If author is specified in Site Configuration params or post Front Matter it will be included automatically in the byline attributing the author:
[params] author = "Billy Joe Jim Bob" # the guy behind the guy behind the guy Adjust hide_author in Site Configuration to suppress attribution site-wide:
Add large hero images without touching an image editor.
Sample image placement. Not the real deal. Add visual appeal to your posts with post images. Post images appear above post content and leverage Hugo Image Processing and Lazy Loading to provide fully automatic, lazy-loaded responsive images with LQIP and built-in art direction.
Using post images requires some opinion with regard to the structure of your content. To create a post with a post image you must:
Add a multi-line plain-text editing control.
Read-only with prefilled text:
{{< hackcss-textarea readonly="true" text="Only this and nothing more." >}} Only this and nothing more. With spellcheck disabled:
{{< hackcss-textarea spellcheck="false" >}} With 16 columns and hard wrapping enabled:
{{< hackcss-textarea cols="16" wrap="hard" >}} Inside disabled form group with error label and placeholder:
{{< hackcss-formgroup hastextarea="true" disabled="true" state="error" >}} {{< hackcss-label for="message" text="Message:" />}} {{< hackcss-textarea id="message" placeholder="Guestbook offline…" rows="10" >}} {{< /hackcss-formgroup >}} Message: