Highlight code Jekill (Github Page)

13 Oct 2019 » jekyll, blog (aproximadamente 12 minutos de leitura)

Jekyll

Esse blog é construido com Jekyll, hospedado sob o githubpages.

Como configurar um domínio do Google Domains no github pages

Esse post de Mateus Malaquias relata configurar um domínio no githubpages.

Como criar um site usando Jekyll

gem install bundler jekyll
jekyll new my-awesome-site
cd my-awesome-site
bundle exec jekyll serve

# => Now browse to http://localhost:4000

Highlight Code

A ferramenta tem um recurso muito interessante para descatar textos com código-fonte chamada Highlight code. Isso ajuda na organização do texto.

Para utilizar a sintaxe para colocar o texto que gostaria de destacar entre essas estruturas { % highlight LANG % } { % endhighlight }.

LANG, pode ser substituído por diversas opções listadas abaixo, obtidas do link. Exemplos de código em python e Java respectivamente.

Exemplo em Java

public class AddTwoIntegers {
public static void main(String[] args) {

int first = 10;
int second = 20;
int sum = first + second;
System.out.println("The sum is: " + sum);
}
}

Exemplo em Python

# Import the modules

import sys
import random

ans = True

while ans:
question = raw_input("Ask the magic 8 ball a question: (press enter to quit) ")

answers = random.randint(1,8)

if question == "":
sys.exit()

elif answers == 1:
print "It is certain"

elif answers == 2:
print "Outlook good"

elif answers == 3:
print "You may rely on it"

elif answers == 4:
print "Ask again later"

elif answers == 5:
print "Concentrate and ask again"

elif answers == 6:
print "Reply hazy, try again"

elif answers == 7:
print "My reply is no"

elif answers == 8:
print "My sources say no"
Formato Nome da tag
ABAPabap
ActionScriptas, actionscript
ActionScript 3as3, actionscript3
Adaada, ada95, ada2005
Agdaagda
Alloyalloy
AmbientTalkat, ambienttalk, ambienttalk/2
ANTLRantlr
ANTLR With ActionScript Targetantlr-as, antlr-actionscript
ANTLR With C# Targetantlr-csharp, antlr-c#
ANTLR With CPP Targetantlr-cpp
ANTLR With Java Targetantlr-java
ANTLR With ObjectiveC Targetantlr-objc
ANTLR With Perl Targetantlr-perl
ANTLR With Python Targetantlr-python
ANTLR With Ruby Targetantlr-ruby, antlr-rb
ApacheConfapacheconf, aconf, apache
APLapl
AppleScriptapplescript
AspectJaspectj
aspx-csaspx-cs
aspx-vbaspx-vb
Asymptoteasy, asymptote
autohotkeyahk, autohotkey
AutoItautoit
Awkawk, gawk, mawk, nawk
Base Makefilebasemake
Bashbash, sh, ksh, shell
Bash Sessionconsole
Batchfilebat, batch, dosbatch, winbatch
BBCodebbcode
Befungebefunge
BlitzBasicblitzbasic, b3d, bplus
BlitzMaxblitzmax, bmax
Booboo
Brainfuckbrainfuck, bf
Brobro
BUGSbugs, winbugs, openbugs
Cc
C#csharp, c#
C++cpp, c++
c-objdumpc-objdump
ca65 assemblerca65
CBM BASIC V2cbmbas
Ceylonceylon
CFEngine3cfengine3, cf3
cfstatementcfs
ChaiScriptchai, chaiscript
Chapelchapel, chpl
Cheetahcheetah, spitfire
Cirrucirru
Clayclay
Clojureclojure, clj
ClojureScriptclojurescript, cljs
CMakecmake
COBOLcobol
COBOLFreecobolfree
CoffeeScriptcoffee-script, coffeescript, coffee
Coldfusion CFCcfc
Coldfusion HTMLcfm
Common Lispcommon-lisp, cl, lisp, elisp, emacs, emacs-lisp
Coqcoq
cpp-objdumpcpp-objdump, c++-objdumb, cxx-objdump
Croccroc
Cryptolcryptol, cry
CSScss
CSS+Django/Jinjacss+django, css+jinja
CSS+Genshi Textcss+genshitext, css+genshi
CSS+Lassocss+lasso
CSS+Makocss+mako
CSS+mozpreproccss+mozpreproc
CSS+Myghtycss+myghty
CSS+PHPcss+php
CSS+Rubycss+erb, css+ruby
CSS+Smartycss+smarty
CUDAcuda, cu
Cyphercypher
Cythoncython, pyx, pyrex
Dd
d-objdumpd-objdump
Darcs Patchdpatch
Dartdart
Debian Control filecontrol, debcontrol
Debian Sourcelistsourceslist, sources.list, debsources
Delphidelphi, pas, pascal, objectpascal
dgdg
Diffdiff, udiff
Django/Jinjadjango, jinja
Dockerdocker, dockerfile
DTDdtd
Duelduel, jbst, jsonml+bst
Dylandylan
Dylan sessiondylan-console, dylan-repl
DylanLIDdylan-lid, lid
EBNFebnf
eCec
ECLecl
Eiffeleiffel
Elixirelixir, ex, exs
Elixir iex sessioniex
Embedded Ragelragel-em
ERBerb
Erlangerlang
Erlang erl sessionerl
Evoqueevoque
Factorfactor
Fancyfancy, fy
Fantomfan
Felixfelix, flx
Fortranfortran
FoxProfoxpro, vfp, clipper, xbase
FSharpfsharp
GAPgap
GASgas, asm
Genshigenshi, kid, xml+genshi, xml+kid
Genshi Textgenshitext
Gettext Catalogpot, po
Gherkincucumber, gherkin
GLSLglsl
Gnuplotgnuplot
Gogo
Gologolo
GoodData-CLgooddata-cl
Gosugosu
Gosu Templategst
Groffgroff, nroff, man
Groovygroovy
Hamlhaml
Handlebarshandlebars
Haskellhaskell, hs
Haxehx, haxe, hxsl
HTMLhtml
HTML+Cheetahhtml+cheetah, html+spitfire, htmlcheetah
HTML+Django/Jinjahtml+django, html+jinja, htmldjango
HTML+Evoquehtml+evoque
HTML+Genshihtml+genshi, html+kid
HTML+Handlebarshtml+handlebars
HTML+Lassohtml+lasso
HTML+Makohtml+mako
HTML+Myghtyhtml+myghty
HTML+PHPhtml+php
HTML+Smartyhtml+smarty
HTML+Twightml+twig
HTML+Velocityhtml+velocity
HTTPhttp
Hxmlhaxeml, hxml
Hyhylang
Hybrishybris, hy
IDLidl
Idrisidris, idr
Igorigor, igorpro
Inform 6inform6, i6
Inform 6 templatei6t
Inform 7inform7, i7
INIini, cfg, dosini
Ioio
Iokeioke, ik
IRC logsirc
Isabelleisabelle
Jadejade
JAGSjags
Jasminjasmin, jasminxt
Javajava
Java Server Pagejsp
JavaScriptjs, javascript
JavaScript+Cheetahjs+cheetah, javascript+cheetah, js+spitfire, javascript+spitfire
JavaScript+Django/Jinjajs+django, javascript+django, js+jinja, javascript+jinja
JavaScript+Genshi Textjs+genshitext, js+genshi, javascript+genshitext, javascript+genshi
JavaScript+Lassojs+lasso, javascript+lasso
JavaScript+Makojs+mako, javascript+mako
Javascript+mozpreprocjavascript+mozpreproc
JavaScript+Myghtyjs+myghty, javascript+myghty
JavaScript+PHPjs+php, javascript+php
JavaScript+Rubyjs+erb, javascript+erb, js+ruby, javascript+ruby
JavaScript+Smartyjs+smarty, javascript+smarty
JSONjson
JSON-LDjsonld, json-ld
Juliajulia, jl
Julia consolejlcon
Kalkal
Kconfigkconfig, menuconfig, linux-config, kernel-config
Kokakoka
Kotlinkotlin
Lassolasso, lassoscript
Leanlean
Lighttpd configuration filelighty, lighttpd
Limbolimbo
liquidliquid
Literate Agdalagda, literate-agda
Literate Cryptollcry, literate-cryptol, lcryptol
Literate Haskelllhs, literate-haskell, lhaskell
Literate Idrislidr, literate-idris, lidris
LiveScriptlive-script, livescript
LLVMllvm
Logoslogos
Logtalklogtalk
LSLlsl
Lualua
Makefilemake, makefile, mf, bsdmake
Makomako
MAQLmaql
Maskmask
Masonmason
Mathematicamathematica, mma, nb
Matlabmatlab
Matlab sessionmatlabsession
MiniDminid
Modelicamodelica
Modula-2modula2, m2
MoinMoin/Trac Wiki markuptrac-wiki, moin
Monkeymonkey
MOOCodemoocode, moo
MoonScriptmoon, moonscript
mozhashpreprocmozhashpreproc
mozpercentpreprocmozpercentpreproc
MQLmql, mq4, mq5, mql4, mql5
Mscgenmscgen, msc
MuPADmupad
MXMLmxml
Myghtymyghty
MySQLmysql
NASMnasm
Nemerlenemerle
nesCnesc
NewLispnewlisp
Newspeaknewspeak
Nginx configuration filenginx
Nimrodnimrod, nim
Nitnit
Nixnixos, nix
NSISnsis, nsi, nsh
NumPynumpy
objdumpobjdump
objdump-nasmobjdump-nasm
Objective-Cobjective-c, objectivec, obj-c, objc
Objective-C++objective-c++, objectivec++, obj-c++, objc++
Objective-Jobjective-j, objectivej, obj-j, objj
OCamlocaml
Octaveoctave
Oocooc
Opaopa
OpenEdge ABLopenedge, abl, progress
Panpan
Pawnpawn
Perlperl, pl
Perl6perl6, pl6
PHPphp, php3, php4, php5
Pigpig
Pikepike
PL/pgSQLplpgsql
PostgreSQL console (psql)psql, postgresql-console, postgres-console
PostgreSQL SQL dialectpostgresql, postgres
PostScriptpostscript, postscr
POVRaypov
PowerShellpowershell, posh, ps1, psm1
Prologprolog
Propertiesproperties, jproperties
Protocol Bufferprotobuf, proto
Puppetpuppet
PyPy Logpypylog, pypy
Pythonpython, py, sage
Python 3python3, py3
Python 3.0 Tracebackpy3tb
Python console sessionpycon
Python Tracebackpytb
QBasicqbasic, basic
QMLqml
Racketracket, rkt
Ragelragel
Ragel in C Hostragel-c
Ragel in CPP Hostragel-cpp
Ragel in D Hostragel-d
Ragel in Java Hostragel-java
Ragel in Objective C Hostragel-objc
Ragel in Ruby Hostragel-ruby, ragel-rb
Raw token dataraw
RConsolerconsole, rout
Rdrd
REBOLrebol
Redred, red/system
Redcoderedcode
regregistry
ResourceBundleresource, resourcebundle
reStructuredTextrst, rest, restructuredtext
Rexxrexx, arexx
RHTMLrhtml, html+erb, html+ruby
RobotFrameworkrobotframework
RPMSpecspec
RQLrql
RSLrsl
Rubyrb, ruby, duby
Ruby irb sessionrbcon, irb
Rustrust
Ssplus, s, r
Sasssass
Scalascala
Scalate Server Pagessp
Scamlscaml
Schemescheme, scm
Scilabscilab
SCSSscss
Shell Sessionshell-session
Slimslim
Smalismali
Smalltalksmalltalk, squeak, st
Smartysmarty
Snobolsnobol
SourcePawnsp
SPARQLsparql
SQLsql
sqlite3consqlite3
SquidConfsquidconf, squid.conf, squid
Stanstan
Standard MLsml
Swiftswift
SWIGswig
systemverilogsystemverilog, sv
TADS 3tads3
Tcltcl
Tcshtcsh, csh
Teatea
TeXtex, latex
Text onlytext
Todotxttodotxt
Treetoptreetop
Twigtwig
TypeScriptts
UrbiScripturbiscript
Valavala, vapi
VB.netvb.net, vbnet
VCTreeStatusvctreestatus
Velocityvelocity
verilogverilog, v
VGLvgl
vhdlvhdl
VimLvim
XMLxml
XML+Cheetahxml+cheetah, xml+spitfire
XML+Django/Jinjaxml+django, xml+jinja
XML+Evoquexml+evoque
XML+Lassoxml+lasso
XML+Makoxml+mako
XML+Myghtyxml+myghty
XML+PHPxml+php
XML+Rubyxml+erb, xml+ruby
XML+Smartyxml+smarty
XML+Velocityxml+velocity
XQueryxquery, xqy, xq, xql, xqm
XSLTxslt
Xtendxtend
XUL+mozpreprocxul+mozpreproc
YAMLyaml
YAML+Jinjayaml+jinja, salt, sls
Zephirzephir

Related Posts