Skip to content

How to enable the View Source of the Page functionality / button #4055

Answered by squidfunk
lukaszgiez asked this question in Q&A
Discussion options

You must be logged in to vote

Update: this functionality is available as of 9.0.


This is a custom override. I have no plans adding this functionality, because it is solely useful for projects that need you to inspect the Markdown of the page, and there are only a handful of them. Here's the override:

<!-- Edit and view button -->
{% if page.edit_url %}
{% set edit = "https://github.com/squidfunk/mkdocs-material/edit" %}
{% set view = "https://raw.githubusercontent.com/squidfunk/mkdocs-material" %}
<a
href="{{ page.edit_url }}"
title="{{ lang.t('edit.link.title') }}"
class="md-content__button md…

Replies: 6 comments 11 replies

Comment options

You must be logged in to vote
8 replies
@Juke34
Comment options

@squidfunk
Comment options

@squidfunk
Comment options

@Juke34
Comment options

@Juke34
Comment options

Answer selected by squidfunk
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@nothingface0
Comment options

@squidfunk
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@niclasheinz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
9 participants