зеркало из https://github.com/golang/dep.git
docs: First pass on docusaurus
This commit is contained in:
Родитель
5e064a583f
Коммит
430c48a3db
|
@ -0,0 +1,11 @@
|
|||
node_modules
|
||||
.DS_Store
|
||||
lib/core/metadata.js
|
||||
lib/core/MetadataBlog.js
|
||||
website/translated_docs
|
||||
website/build/
|
||||
website/yarn.lock
|
||||
website/node_modules
|
||||
|
||||
website/i18n/*
|
||||
!website/i18n/en.json
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: Announcing dep v0.4.0 (with docs!)
|
||||
author: sam boyer
|
||||
authorURL: http://twitter.com/sdboyer
|
||||
---
|
||||
|
||||
This blog post will test file name parsing issues when periods are present.
|
|
@ -0,0 +1,19 @@
|
|||
const React = require('react');
|
||||
|
||||
const siteConfig = require(process.cwd() + '/siteConfig.js');
|
||||
|
||||
class Footer extends React.Component {
|
||||
render() {
|
||||
const currentYear = new Date().getFullYear();
|
||||
return (
|
||||
<footer className="nav-footer" id="footer">
|
||||
|
||||
<section className="copyright">
|
||||
{siteConfig.copyright}
|
||||
</section>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Footer;
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"_comment": "This file is auto-generated by write-translations.js",
|
||||
"localized-strings": {
|
||||
"next": "Next",
|
||||
"previous": "Previous",
|
||||
"tagline": "Dependency management for Go",
|
||||
"daily-dep": "Daily Dep",
|
||||
"deduction": "Import Path Deduction",
|
||||
"ensure-mechanics": "Models and Mechanisms",
|
||||
"failure-modes": "Failure Modes",
|
||||
"FAQ": "FAQ",
|
||||
"glossary": "Glossary",
|
||||
"Gopkg.lock": "Gopkg.lock",
|
||||
"Gopkg.toml": "Gopkg.toml",
|
||||
"installation": "Installation",
|
||||
"introduction": "Getting Started",
|
||||
"migrating": "Migrating to Dep",
|
||||
"new-project": "Creating a New Project",
|
||||
"the-solver": "The Solver",
|
||||
"Documentation": "Documentation",
|
||||
"Blog": "Blog",
|
||||
"Guides": "Guides",
|
||||
"References": "References"
|
||||
},
|
||||
"pages-strings": {
|
||||
"Help Translate|recruit community translators for your project": "Help Translate",
|
||||
"Edit this Doc|recruitment message asking to edit the doc source": "Edit",
|
||||
"Translate this Doc|recruitment message asking to translate the docs": "Translate"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"scripts": {
|
||||
"examples": "docusaurus-examples",
|
||||
"start": "docusaurus-start",
|
||||
"build": "docusaurus-build",
|
||||
"publish-gh-pages": "docusaurus-publish",
|
||||
"write-translations": "docusaurus-write-translations",
|
||||
"version": "docusaurus-version",
|
||||
"rename-version": "docusaurus-rename-version"
|
||||
},
|
||||
"devDependencies": {
|
||||
"docusaurus": "^1.0.3"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
const React = require('react');
|
||||
|
||||
const CompLibrary = require('../../core/CompLibrary.js');
|
||||
const Container = CompLibrary.Container;
|
||||
const GridBlock = CompLibrary.GridBlock;
|
||||
|
||||
const siteConfig = require(process.cwd() + '/siteConfig.js');
|
||||
|
||||
class Help extends React.Component {
|
||||
render() {
|
||||
const supportLinks = [
|
||||
{
|
||||
content:
|
||||
'Learn more using the [documentation on this site.](/test-site/docs/en/doc1.html)',
|
||||
title: 'Browse Docs',
|
||||
},
|
||||
{
|
||||
content: 'Ask questions about the documentation and project',
|
||||
title: 'Join the community',
|
||||
},
|
||||
{
|
||||
content: "Find out what's new with this project",
|
||||
title: 'Stay up to date',
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="docMainWrapper wrapper">
|
||||
<Container className="mainContainer documentContainer postContainer">
|
||||
<div className="post">
|
||||
<header className="postHeader">
|
||||
<h2>Need help?</h2>
|
||||
</header>
|
||||
<p>This project is maintained by a dedicated group of people.</p>
|
||||
<GridBlock contents={supportLinks} layout="threeColumn" />
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Help;
|
|
@ -0,0 +1,91 @@
|
|||
const React = require('react');
|
||||
|
||||
const CompLibrary = require('../../core/CompLibrary.js');
|
||||
const MarkdownBlock = CompLibrary.MarkdownBlock; /* Used to read markdown */
|
||||
const Container = CompLibrary.Container;
|
||||
const GridBlock = CompLibrary.GridBlock;
|
||||
|
||||
const siteConfig = require(process.cwd() + '/siteConfig.js');
|
||||
|
||||
class Button extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="pluginWrapper buttonWrapper">
|
||||
<a className="button" href={this.props.href} target={this.props.target}>
|
||||
{this.props.children}
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Button.defaultProps = {
|
||||
target: '_self',
|
||||
};
|
||||
|
||||
class HomeSplash extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div className="homeContainer">
|
||||
<div className="homeSplashFade">
|
||||
<div className="wrapper homeWrapper">
|
||||
<div className="projectLogo">
|
||||
<img src={siteConfig.baseUrl + 'docs/assets/DigbyShadows.svg'} />
|
||||
</div>
|
||||
<div className="inner">
|
||||
<h2 className="projectTitle">
|
||||
{siteConfig.title}
|
||||
<small>{siteConfig.tagline}</small>
|
||||
</h2>
|
||||
<div className="section promoSection">
|
||||
<div className="promoRow">
|
||||
<div className="pluginRowBlock">
|
||||
<Button
|
||||
href={
|
||||
siteConfig.baseUrl +
|
||||
'docs/introduction.html'
|
||||
}>
|
||||
Documentation
|
||||
</Button>
|
||||
<Button
|
||||
href={
|
||||
siteConfig.baseUrl +
|
||||
'blog'
|
||||
}>
|
||||
Announcements
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class Index extends React.Component {
|
||||
render() {
|
||||
let language = this.props.language || 'en';
|
||||
const showcase = siteConfig.users
|
||||
.filter(user => {
|
||||
return user.pinned;
|
||||
})
|
||||
.map(user => {
|
||||
return (
|
||||
<a href={user.infoLink}>
|
||||
<img src={user.image} title={user.caption} />
|
||||
</a>
|
||||
);
|
||||
});
|
||||
|
||||
return (
|
||||
<div>
|
||||
<HomeSplash language={language} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Index;
|
|
@ -0,0 +1,40 @@
|
|||
const React = require('react');
|
||||
|
||||
const CompLibrary = require('../../core/CompLibrary.js');
|
||||
const Container = CompLibrary.Container;
|
||||
|
||||
const siteConfig = require(process.cwd() + '/siteConfig.js');
|
||||
|
||||
class Users extends React.Component {
|
||||
render() {
|
||||
const showcase = siteConfig.users.map((user, i) => {
|
||||
return (
|
||||
<a href={user.infoLink} key={i}>
|
||||
<img src={user.image} title={user.caption} />
|
||||
</a>
|
||||
);
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="mainContainer">
|
||||
<Container padding={['bottom', 'top']}>
|
||||
<div className="showcaseSection">
|
||||
<div className="prose">
|
||||
<h1>Who's Using This?</h1>
|
||||
<p>This project is used by many folks</p>
|
||||
</div>
|
||||
<div className="logos">{showcase}</div>
|
||||
<p>Are you using this project?</p>
|
||||
<a
|
||||
href="https://github.com/golang/dep/edit/master/website/siteConfig.js"
|
||||
className="button">
|
||||
Add your company
|
||||
</a>
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Users;
|
|
@ -0,0 +1,88 @@
|
|||
const React = require('react');
|
||||
|
||||
const CompLibrary = require('../../core/CompLibrary');
|
||||
const Container = CompLibrary.Container;
|
||||
const GridBlock = CompLibrary.GridBlock;
|
||||
|
||||
const CWD = process.cwd();
|
||||
|
||||
const siteConfig = require(CWD + '/siteConfig.js');
|
||||
const versions = require(CWD + '/versions.json');
|
||||
|
||||
class Versions extends React.Component {
|
||||
render() {
|
||||
const latestVersion = versions[0];
|
||||
return (
|
||||
<div className="docMainWrapper wrapper">
|
||||
<Container className="mainContainer versionsContainer">
|
||||
<div className="post">
|
||||
<header className="postHeader">
|
||||
<h2>{siteConfig.title + ' Versions'}</h2>
|
||||
</header>
|
||||
<p>New versions of dep are released regularly.</p>
|
||||
<a name="latest" />
|
||||
<h3>Current version (Stable)</h3>
|
||||
<table className="versions">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>{latestVersion}</th>
|
||||
<td>
|
||||
<a href={siteConfig.baseUrl + 'docs/' + latestVersion + '/introduction.html'}>Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href={"https://github.com/golang/dep/releases/tag/"+latestVersion}>Release Notes</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
This is the version that is configured automatically when you
|
||||
first install this project.
|
||||
</p>
|
||||
<a name="rc" />
|
||||
<h3>Development versions</h3>
|
||||
<table className="versions">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>master</th>
|
||||
<td>
|
||||
<a href={''}>Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href={''}>Release Notes</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Other text describing this section.</p>
|
||||
<a name="archive" />
|
||||
<h3>Past Versions</h3>
|
||||
<table className="versions">
|
||||
<tbody>
|
||||
{versions.map(
|
||||
version =>
|
||||
version !== latestVersion && (
|
||||
<tr>
|
||||
<th>{version}</th>
|
||||
<td>
|
||||
<a href={''}>Documentation</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href={''}>Release Notes</a>
|
||||
</td>
|
||||
</tr>
|
||||
)
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
A full list of past releases can be found <a href="https://github.com/golang/dep/releases">on GitHub</a>.
|
||||
</p>
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Versions;
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"docs": {
|
||||
"Guides": ["introduction", "installation", "new-project", "migrating", "daily-dep"],
|
||||
"References": ["ensure-mechanics", "failure-modes", "the-solver", "deduction", "Gopkg.toml", "Gopkg.lock", "FAQ", "glossary"]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
/* List of projects/orgs using your project for the users page */
|
||||
const users = [
|
||||
];
|
||||
|
||||
const siteConfig = {
|
||||
title: 'dep' /* title for your website */,
|
||||
tagline: 'Dependency management for Go',
|
||||
url: 'https://golang.github.io' /* your website url */,
|
||||
baseUrl: '/dep/' /* base url for your project */,
|
||||
editURL: 'https://github.com/golang/dep/edit/master/docs/',
|
||||
projectName: 'dep',
|
||||
headerLinks: [
|
||||
{doc: 'introduction', label: 'Documentation'},
|
||||
{blog: true, label: 'Blog'},
|
||||
],
|
||||
users,
|
||||
/* path to images for header/footer */
|
||||
headerIcon: 'docs/assets/DigbyFlat.svg',
|
||||
footerIcon: 'docs/assets/DigbyShadowsScene2.svg',
|
||||
favicon: 'docs/assets/DigbyScene2Flat.png',
|
||||
/* colors for website */
|
||||
colors: {
|
||||
secondaryColor: '#E0EBF5',
|
||||
primaryColor: '#375EAB',
|
||||
},
|
||||
// This copyright info is used in /core/Footer.js and blog rss/atom feeds.
|
||||
copyright:
|
||||
'Copyright © ' +
|
||||
new Date().getFullYear() +
|
||||
' The Go Authors',
|
||||
organizationName: 'golang', // or set an env variable ORGANIZATION_NAME
|
||||
projectName: 'dep', // or set an env variable PROJECT_NAME
|
||||
highlight: {
|
||||
// Highlight.js theme to use for syntax highlighting in code blocks
|
||||
theme: 'default',
|
||||
},
|
||||
scripts: ['https://buttons.github.io/buttons.js'],
|
||||
// You may provide arbitrary config keys to be used as needed by your template.
|
||||
repoUrl: 'https://github.com/golang/dep',
|
||||
};
|
||||
|
||||
module.exports = siteConfig;
|
|
@ -0,0 +1,16 @@
|
|||
/* your custom css */
|
||||
|
||||
@media only screen and (min-device-width: 360px) and (max-device-width: 736px) {
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1024px) {
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1023px) {
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1400px) {
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1500px) {
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче