File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed
src/components/controllers Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change 2424 />
2525 < meta name ="theme-color " content ="#673AB8 " />
2626 < meta name ="twitter:card " content ="summary " />
27- <!-- <meta
28- property="og:url"
29- content="https://preactjs.com<%= htmlWebpackPlugin.options.url %>"
30- /> -->
31- <!-- <meta
32- property="og:title"
33- content="<%= htmlWebpackPlugin.options.title %>"
34- /> -->
35- <!-- <meta
27+ < meta property ="og:url " content ="https://preactjs.com " />
28+ < meta property ="og:title " content ="Preact " />
29+ < meta
3630 property ="og:description "
37- content="<%= htmlWebpackPlugin.options.CLI_DATA.preRenderData.description %> "
38- /> -->
31+ content ="Preact is a fast 3kB alternative to React with the same modern API. "
32+ />
3933 < meta
4034 property ="og:image "
4135 content ="https://preactjs.com/assets/app-icon.png "
Original file line number Diff line number Diff line change 11import EditThisPage from '../edit-button' ;
22import ContentRegion from '../content-region' ;
3- import { useRoute } from 'preact-iso' ;
3+ import { useRoute , useLocation } from 'preact-iso' ;
44import { useTitle , useMeta , useTitleTemplate } from 'hoofd/preact' ;
55import style from './style.module.less' ;
66
77export function MarkdownRegion ( { html, meta } ) {
88 const { params } = useRoute ( ) ;
9+ const { url } = useLocation ( ) ;
910
1011 useTitleTemplate (
1112 '%s | Preact: Fast 3kb React alternative with the same ES6 API. Components & Virtual DOM.'
1213 ) ;
1314 useTitle ( meta . title ) ;
1415 useMeta ( { name : 'description' , content : meta . description } ) ;
16+ useMeta ( { name : 'og:description' , content : meta . description } ) ;
17+ useMeta ( { name : 'og:title' , content : meta . title } ) ;
18+ useMeta ( { name : 'og:url' , content : url } ) ;
1519
1620 const showTitle = 'show_title' in meta ? ! ! meta . show_title : true ;
1721 const canEdit = showTitle && params . name != '404' ;
You can’t perform that action at this time.
0 commit comments