SlideShare uma empresa Scribd logo
1 de 30
Baixar para ler offline
MAKING BEAUTIFUL DOCS
C O F F E E & C O D E
READ ON
Writing
Beautiful docs:
PARTONE
Coffee&Code/Feb2020
CHOOSE
YOUR
AUDIENCE
WRITINGBEAUTIFULDOCUMENTATION
Users Developers Future-you
Coffee&Code/Feb2020
CHOOSE
YOUR
STYLE
WRITINGBEAUTIFULDOCUMENTATION
Comments Docstrings Free text
Coffee&Code/Feb2020
Docstrings
• Often used for documenting APIs
• Write docs as you write code, no
context switching
• Great if people need to use your
code
• Not very coherent by itself
G r e a t f o r p e o p l e u s i n g y o u r c o d e
Coffee&Code/Feb2020
Free text
• Write free text in prose
• Can use markup languages (eg. Markdown)
• Can use WYSIWYG editors
• Code and documentation in separate files
• Describe concepts and usage
F o r p a c k a g e d t o o l s a n d p r o j e c t s
Coffee&Code/Feb2020
Automate writing
Editor plugins
Auto-generate docstrings
and lint for missing variables
Lint markdown text as you
write, and on every push / PR
Coffee&Code/Feb2020
Visualise writing
See your documentation
WYSIWYM (what you see is
what you mean) editors
render in-place as you type
Preview Markdown rendering
as you type
typora.io
NEVER
UNDERESTIMATE
A README
READ ON
Building
Beautiful docs:
PARTTWO
Coffee&Code/Feb2020
Online docs
The basics
Build
Convert what you've
written to HTML
Host
Make these HTML pages
available on the web
Coffee&Code/Feb2020
DE-FACTO
STANDARD
• Free hosting
• Multiple versions
• Quick to get up and running
• Autodoc docstrings!
Coffee&Code/Feb2020
GO YOUR
OWN WAY
• Autodoc docstrings!
• Custom themes
• Full customisation, plugins
Coffee&Code/Feb2020
LOOK MA!
THEMES!
• Auto-refresh local server
• Lots of nice themes available
• Markdown + YAML
• Easy to customise
• Also supported by Read the Docs
MkDocs
Coffee&Code/Feb2020
RICH TEXT
EASY EDIT
• WYSIWYG editor for
markdown
• Bi-directional integration with
GitHub
• Free hosting + domain
• Powerful addons, especially
for web APIs
Coffee&Code/Feb2020
STATIC WEB
BUILDERS
• Build static sites from Markdown
• Lots of templates available
• Complete customisation possible
Coffee&Code/Feb2020
ROLL YOUR
OWN
• Convert markdown to HTML
yourself
• Build your own website
• Total control over the output
• Can add in additional
functionality
• More difficult than the
alternatives
READ ON
Hosting
Beautiful docs:
PARTTWO
Coffee&Code/Feb2020
WHAT
YOU
NEED
• Update on commit
• Automatically build HTML docs
• Host web pages
Coffee&Code/Feb2020
• Renders Markdown / RST / others into
HTML automatically
• Comes for free when you use GitHub
• Co-located with code
• Impossible to customise aesthetics
GitHub
Repository
Coffee&Code/Feb2020
• Builds Spinx and MkDocs automatically
• Free for open-source repos
• readthedocs.io subdomain URL for free
• Custom domain names possible
Read
the Docs
Coffee&Code/Feb2020
• Host any static HTML for free
• github.io domain name for free
• Custom domain names possible
• Can build Jekyll websites automatically
GitHub
Pages
Coffee&Code/Feb2020
• Automate just about anything
• Run any docs build tool for every commit
• Push to a GitHub Pages branch
• Upload HTML to any web server
GitHub
Actions
Coffee&Code/Feb2020
• Host your website anywhere you want
• Build your website however you want
• Style your website however you want
• Probably not free
Personal
Hosting
READ ON
The GitHub API
The wonderful world of:
BONUS
Coffee&Code/Feb2020
Triggers
Web Hooks
Ping a remote URL with a
JSON payload when a
given event happens
R e a c t t o e v e n t s o n G i t H u b
GitHub Actions
Run a compute job with
custom software and
commands on a given trigger
• Web hooks broadcast
event information to
other resources
• GitHub Actions run jobs
when requested
Coffee&Code/Feb2020
nf-core website
Fetch details for all pipelines
Releases, keywords, stars, downloads, clones, file
tree, markdown documentation
Repository statistics
Clones, commits, issues, pull-requests,
contributors, unique cloners
Organisation settings
Org members, repository settings, *membership
visibility, *automated invites
Coffee&Code/Feb2020
nf-core website
Check repo settings
27 setting tests across 48 repositories
Coffee&Code/Feb2020
nf-core website
Check repo settings
27 setting tests across 48 repositories
Fix repo settings
Attempt to fix incorrect settings in one click
Make Beautiful Docs!
Phil Ewels
phil.ewels@scilifelab.se tallphilewels
sphinx-doc.org
readthedocs.org
mkdocs.org
jekyllrb.com
gohugo.io
pages.github.com
Icons: thenounproject.com Theme: EASY
gitbook.com
typora.io
Images: unsplash.com

Mais conteúdo relacionado

Mais de Phil Ewels

SciLifeLab NGI NovaSeq seminar
SciLifeLab NGI NovaSeq seminarSciLifeLab NGI NovaSeq seminar
SciLifeLab NGI NovaSeq seminarPhil Ewels
 
Lecture: NGS at the National Genomics Infrastructure
Lecture: NGS at the National Genomics InfrastructureLecture: NGS at the National Genomics Infrastructure
Lecture: NGS at the National Genomics InfrastructurePhil Ewels
 
SBW 2016: MultiQC Workshop
SBW 2016: MultiQC WorkshopSBW 2016: MultiQC Workshop
SBW 2016: MultiQC WorkshopPhil Ewels
 
Whole Genome Sequencing - Data Processing and QC at SciLifeLab NGI
Whole Genome Sequencing - Data Processing and QC at SciLifeLab NGIWhole Genome Sequencing - Data Processing and QC at SciLifeLab NGI
Whole Genome Sequencing - Data Processing and QC at SciLifeLab NGIPhil Ewels
 
NBIS ChIP-seq course
NBIS ChIP-seq courseNBIS ChIP-seq course
NBIS ChIP-seq coursePhil Ewels
 
NBIS RNA-seq course
NBIS RNA-seq courseNBIS RNA-seq course
NBIS RNA-seq coursePhil Ewels
 
Developing Reliable QC at the Swedish National Genomics Infrastructure
Developing Reliable QC at the Swedish National Genomics InfrastructureDeveloping Reliable QC at the Swedish National Genomics Infrastructure
Developing Reliable QC at the Swedish National Genomics InfrastructurePhil Ewels
 
Standardising Swedish genomics analyses using nextflow
Standardising Swedish genomics analyses using nextflowStandardising Swedish genomics analyses using nextflow
Standardising Swedish genomics analyses using nextflowPhil Ewels
 
Using visual aids effectively
Using visual aids effectivelyUsing visual aids effectively
Using visual aids effectivelyPhil Ewels
 
Analysis of ChIP-Seq Data
Analysis of ChIP-Seq DataAnalysis of ChIP-Seq Data
Analysis of ChIP-Seq DataPhil Ewels
 
Internet McMenemy
Internet McMenemyInternet McMenemy
Internet McMenemyPhil Ewels
 

Mais de Phil Ewels (11)

SciLifeLab NGI NovaSeq seminar
SciLifeLab NGI NovaSeq seminarSciLifeLab NGI NovaSeq seminar
SciLifeLab NGI NovaSeq seminar
 
Lecture: NGS at the National Genomics Infrastructure
Lecture: NGS at the National Genomics InfrastructureLecture: NGS at the National Genomics Infrastructure
Lecture: NGS at the National Genomics Infrastructure
 
SBW 2016: MultiQC Workshop
SBW 2016: MultiQC WorkshopSBW 2016: MultiQC Workshop
SBW 2016: MultiQC Workshop
 
Whole Genome Sequencing - Data Processing and QC at SciLifeLab NGI
Whole Genome Sequencing - Data Processing and QC at SciLifeLab NGIWhole Genome Sequencing - Data Processing and QC at SciLifeLab NGI
Whole Genome Sequencing - Data Processing and QC at SciLifeLab NGI
 
NBIS ChIP-seq course
NBIS ChIP-seq courseNBIS ChIP-seq course
NBIS ChIP-seq course
 
NBIS RNA-seq course
NBIS RNA-seq courseNBIS RNA-seq course
NBIS RNA-seq course
 
Developing Reliable QC at the Swedish National Genomics Infrastructure
Developing Reliable QC at the Swedish National Genomics InfrastructureDeveloping Reliable QC at the Swedish National Genomics Infrastructure
Developing Reliable QC at the Swedish National Genomics Infrastructure
 
Standardising Swedish genomics analyses using nextflow
Standardising Swedish genomics analyses using nextflowStandardising Swedish genomics analyses using nextflow
Standardising Swedish genomics analyses using nextflow
 
Using visual aids effectively
Using visual aids effectivelyUsing visual aids effectively
Using visual aids effectively
 
Analysis of ChIP-Seq Data
Analysis of ChIP-Seq DataAnalysis of ChIP-Seq Data
Analysis of ChIP-Seq Data
 
Internet McMenemy
Internet McMenemyInternet McMenemy
Internet McMenemy
 

Último

Role of AI in seed science Predictive modelling and Beyond.pptx
Role of AI in seed science  Predictive modelling and  Beyond.pptxRole of AI in seed science  Predictive modelling and  Beyond.pptx
Role of AI in seed science Predictive modelling and Beyond.pptxArvind Kumar
 
Use of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptxUse of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptxRenuJangid3
 
Terpineol and it's characterization pptx
Terpineol and it's characterization pptxTerpineol and it's characterization pptx
Terpineol and it's characterization pptxMuhammadRazzaq31
 
Genome organization in virus,bacteria and eukaryotes.pptx
Genome organization in virus,bacteria and eukaryotes.pptxGenome organization in virus,bacteria and eukaryotes.pptx
Genome organization in virus,bacteria and eukaryotes.pptxCherry
 
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptxTHE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptxANSARKHAN96
 
Cot curve, melting temperature, unique and repetitive DNA
Cot curve, melting temperature, unique and repetitive DNACot curve, melting temperature, unique and repetitive DNA
Cot curve, melting temperature, unique and repetitive DNACherry
 
TransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRings
TransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRingsTransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRings
TransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRingsSérgio Sacani
 
Cyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxCyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxCherry
 
Concept of gene and Complementation test.pdf
Concept of gene and Complementation test.pdfConcept of gene and Complementation test.pdf
Concept of gene and Complementation test.pdfCherry
 
Genetics and epigenetics of ADHD and comorbid conditions
Genetics and epigenetics of ADHD and comorbid conditionsGenetics and epigenetics of ADHD and comorbid conditions
Genetics and epigenetics of ADHD and comorbid conditionsbassianu17
 
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...Scintica Instrumentation
 
LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.Cherry
 
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort ServiceCall Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort Serviceshivanisharma5244
 
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate ProfessorThyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate Professormuralinath2
 
FAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical ScienceFAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical ScienceAlex Henderson
 
Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.Cherry
 
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptxClimate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptxDiariAli
 
Plasmid: types, structure and functions.
Plasmid: types, structure and functions.Plasmid: types, structure and functions.
Plasmid: types, structure and functions.Cherry
 
Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.Cherry
 

Último (20)

Role of AI in seed science Predictive modelling and Beyond.pptx
Role of AI in seed science  Predictive modelling and  Beyond.pptxRole of AI in seed science  Predictive modelling and  Beyond.pptx
Role of AI in seed science Predictive modelling and Beyond.pptx
 
Use of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptxUse of mutants in understanding seedling development.pptx
Use of mutants in understanding seedling development.pptx
 
Terpineol and it's characterization pptx
Terpineol and it's characterization pptxTerpineol and it's characterization pptx
Terpineol and it's characterization pptx
 
Genome organization in virus,bacteria and eukaryotes.pptx
Genome organization in virus,bacteria and eukaryotes.pptxGenome organization in virus,bacteria and eukaryotes.pptx
Genome organization in virus,bacteria and eukaryotes.pptx
 
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptxTHE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
 
Early Development of Mammals (Mouse and Human).pdf
Early Development of Mammals (Mouse and Human).pdfEarly Development of Mammals (Mouse and Human).pdf
Early Development of Mammals (Mouse and Human).pdf
 
Cot curve, melting temperature, unique and repetitive DNA
Cot curve, melting temperature, unique and repetitive DNACot curve, melting temperature, unique and repetitive DNA
Cot curve, melting temperature, unique and repetitive DNA
 
TransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRings
TransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRingsTransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRings
TransientOffsetin14CAftertheCarringtonEventRecordedbyPolarTreeRings
 
Cyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxCyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptx
 
Concept of gene and Complementation test.pdf
Concept of gene and Complementation test.pdfConcept of gene and Complementation test.pdf
Concept of gene and Complementation test.pdf
 
Genetics and epigenetics of ADHD and comorbid conditions
Genetics and epigenetics of ADHD and comorbid conditionsGenetics and epigenetics of ADHD and comorbid conditions
Genetics and epigenetics of ADHD and comorbid conditions
 
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
(May 9, 2024) Enhanced Ultrafast Vector Flow Imaging (VFI) Using Multi-Angle ...
 
LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.LUNULARIA -features, morphology, anatomy ,reproduction etc.
LUNULARIA -features, morphology, anatomy ,reproduction etc.
 
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort ServiceCall Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
 
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate ProfessorThyroid Physiology_Dr.E. Muralinath_ Associate Professor
Thyroid Physiology_Dr.E. Muralinath_ Associate Professor
 
FAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical ScienceFAIRSpectra - Enabling the FAIRification of Analytical Science
FAIRSpectra - Enabling the FAIRification of Analytical Science
 
Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.Selaginella: features, morphology ,anatomy and reproduction.
Selaginella: features, morphology ,anatomy and reproduction.
 
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptxClimate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
 
Plasmid: types, structure and functions.
Plasmid: types, structure and functions.Plasmid: types, structure and functions.
Plasmid: types, structure and functions.
 
Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.Porella : features, morphology, anatomy, reproduction etc.
Porella : features, morphology, anatomy, reproduction etc.
 

Making Beautiful Documentation