Skip to content
Permalink
Browse files

try out CMS editor

  • Loading branch information
eddiewebb committed Jan 7, 2020
1 parent b29c047 commit 5389c0f342c8303fa0eddb7920e5dee0d2b6061f
@@ -4,7 +4,7 @@ date: 2018-12-10T18:56:13-05:00
sitemap:
priority : 1.0
---
Director of Solutions @ [CircleCI](https://circleci.com)
Global Director of Solutions Engineering @ [CircleCI](https://circleci.com)

Eddie has over a decade of experience enabling agile, CI/CD and DevOps culture in the enterprise. Previously the Director of Enterprise Software Delivery Platforms at a Fortune 100 company, Eddie now leverages his experience influencing culture and technology to help CircleCI customers of all sizes adopt the best technologies and practices along their journey.

@@ -4,4 +4,4 @@ sitemap:
priority : 0.5
weight: 10
---
<p>A collection of projects authored by Eddie, and likely shared out with the community as an open source project.</p>
<p>A collection of projects authored by Eddie, and likely shared out with the community as an open source project. Mostl likely integrations supporting CI, CD or DevOps tooling maturity.</p>
@@ -1,6 +1,6 @@
[
{
"school":"Rochester Institute of Technology",
"school":"[Rochester Institute of Technology](google.com)",
"degree":"Bachelor of Science",
"major":"Management Information Systems",
"notes":"Beta Gamma Signma, High Honors",
@@ -1,8 +1,8 @@
[
{
"role":"Director of Solutions",
"role":"Global Director, Solutions Engineering",
"company":"CircleCI",
"summary":"Making DevOps Mo' Betta for teams across the globe!",
"summary":"Supporting technical sales and strategic consulting across North America, EMEA, APAC and Latin America",
"range":"January 2019 - Present"
},
{
@@ -0,0 +1,13 @@
# Netlify CMS Support

This folder exposes an `/admin` page in your website that allows a CMS editor experience.

All changes are pushed to the GitHub repository (right to master, or via PR is configurable)

## Using on your site

1) Copy the full admin folder (this folder) from exampleSite within theme to the 'static' folder of you hugo site.
`cp -a PROJECT_DIRECTORY/themes/hugo-resume/admin PROJECT_DIRECTORY/static`
2) Edit `config.yml` (which includes hints) to reflect any changes you made to content structure, and also
- Github Repository Path
- Paths to images and content folders
@@ -0,0 +1,8 @@

import AboutPreview from "./templates/about.js";

CMS.registerPreviewStyle("/css/resume.css");
CMS.registerPreviewStyle("/css/tweaks.css");

CMS.registerPreviewTemplate("about", AboutPreview);
CMS.init();
@@ -0,0 +1,136 @@
#
#. This config file adds support for Netlify CMS, exposed at /admin on the running site.
# In order to use this on your site,
#. 1) replace instances of "src/......" with the appropriate paths, relative from repository root.
#. 2) replace repo path in `backend` settings, and set branch to master.
# 3) Optionally enable the [editor workflow](https://www.netlifycms.org/docs/configuration-options/#publish-mode) which uses PRs for content changes
# 4) Optionally enable [open authoring](https://www.netlifycms.org/docs/open-authoring/) for community sites, which requires #3
#
#



backend:
name: github
repo: eddiewebb/json-resume


media_folder: "src/static/img" # Folder where user uploaded files should go
public_folder: "img"

collections: # A list of collections the CMS should be able to edit
- name: "Blog" # Used in routes, ie.: /admin/collections/:slug/edit
label: "Blog" # Used in the UI, ie.: "New Post"
folder: "src/content/blog" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
fields: # The fields each document in this collection have
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "Tags", name: "tags", widget: "list", required: false}
- {label: "Body", name: "body", widget: "markdown"}

- name: "Projects" # Used in routes, ie.: /admin/collections/:slug/edit
label: "Projects" # Used in the UI, ie.: "New Post"
folder: "src/content/projects/creations" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
fields: # The fields each document in this collection have
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "featured", name: "featured", widget: "boolean", required: false}
- {label: "link to project repo or site", name: "link", widget: "string"}
- {label: "Project Image", name: image, widget: 'image' }
- {label: "Brief description", name: "description", widget: "string"}
- {label: "Tags", name: "tags", widget: "list", required: false}
- {label: "Fun Fact or Stat", name: "fact", widget: "string", default: "used by 20% of Fortune 500 companies!", required: false}
- {label: "weight (lower get more visibility)", name: "weight", widget: "number", valueType: float, step: 10, min: 0, max: 1000}
- {label: "Sitemap", name: "sitemap", widget: "object", field: {label: weight, name: weight, widget: "number", valueType: float, step: 0.1, min: 0.0, max: 1.0}}
- {label: "Body", name: "body", widget: "markdown"}

- name: "Contributions" # Used in routes, ie.: /admin/collections/:slug/edit
label: "Contributions" # Used in the UI, ie.: "New Post"
folder: "src/content/projects/contributions" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
fields: # The fields each document in this collection have
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "featured", name: "featured", widget: "boolean", required: false}
- {label: "link to project repo or site", name: "link", widget: "string"}
- {label: "Project Image", name: image, widget: 'image' }
- {label: "Brief description", name: "description", widget: "string"}
- {label: "Tags", name: "tags", widget: "list", required: false}
- {label: "Fun Fact or Stat", name: "fact", widget: "string", default: "used by 20% of Fortune 500 companies!", required: false}
- {label: "weight (lower get more visibility)", name: "weight", widget: "number", valueType: float, step: 10, min: 0, max: 1000}
- {label: "Sitemap", name: "sitemap", widget: "object", field: {label: weight, name: weight, widget: "number", valueType: float, step: 0.1, min: 0.0, max: 1.0}}
- {label: "Body", name: "body", widget: "markdown"}

- name: "Publications" # Used in routes, ie.: /admin/collections/:slug/edit
label: "Publications" # Used in the UI, ie.: "New Post"
folder: "src/content/publications" # The path to the folder where the documents are stored
create: true # Allow users to create new documents in this collection
fields: # The fields each document in this collection have
- {label: "Title", name: "title", widget: "string"}
- {label: "Publish Date", name: "date", widget: "datetime"}
- {label: "featured", name: "featured", widget: "boolean", required: false}
- {label: "link to project repo or site", name: "link", widget: "string"}
- {label: "Project Image", name: image, widget: 'image' }
- {label: "Brief description", name: "description", widget: "string"}
- {label: "Tags", name: "tags", widget: "list", required: false}
- {label: "Fun Fact or Stat", name: "fact", widget: "string", default: "used by 20% of Fortune 500 companies!", required: false}
- {label: "weight (lower get more visibility)", name: "weight", widget: "number", valueType: float, step: 10, min: 0, max: 1000}
- {label: "Sitemap", name: "sitemap", widget: "object", field: {label: weight, name: weight, widget: "number", valueType: float, step: 0.1, min: 0.0, max: 1.0}}
- {label: "Body", name: "body", widget: "markdown"}

- name: 'settings'
label: 'Settings'
delete: false # Prevent users from deleting documents in this collection
editor:
preview: false
files:
- name: 'general'
label: 'Site Settings'
file: 'src/config.toml'
extension: toml
description: 'General Site Settings'
fields:
- { label: 'Global title', name: 'title', widget: 'string' }
- { label: 'Site Url', name: 'baseURL', widget: 'string' }
- { label: 'Theme', name: 'theme', widget: 'hidden', default: "hugo-resume" }
- { label: 'Language Code', name: 'languageCode', widget: 'hidden', default: "en-us" }
- { label: 'PygmentCodeFences', name: 'PygmentsCodeFences', widget: 'boolean', required: false }
- { label: 'PygmentCodeFencesGuessSyntax', name: 'PygmentsCodeFencesGuessSyntax', widget: 'boolean', required: false }
- { label: 'PygmentCodeFencesGuessSyntax', name: 'PygmentsStyle', widget: 'string' }
- label: 'Params'
name: 'params'
widget: 'object'
fields:
- { label: 'First Name', name: 'firstName', widget: 'string' }
- { label: 'Last Name', name: 'lastName', widget: 'string' }
- { label: address, name: address, widget: 'string' }
- { label: profileImage, name: profileImage, widget: 'image' }
- { label: 'phone', name: 'phone', widget: 'string' }
- { label: 'email', name: 'email', widget: 'string' }
- label: 'Social Handles'
name: 'handles'
widget: 'list'
fields:
- { label: 'Name', name: 'name', widget: 'string' }
- { label: 'Link', name: 'link', widget: 'string' }

- { label: 'showSkills', name: 'showSkills', widget: 'boolean', required: false }
- { label: 'showProjects', name: 'showProjects', widget: 'boolean', required: false }
- { label: 'showOpenSource', name: 'showOpenSource', widget: 'boolean', required: false }
- { label: 'showPublications', name: 'showPublications', widget: 'boolean', required: false }
- { label: 'showExperience', name: 'showExperience', widget: 'boolean', required: false }
- { label: 'showEducation', name: 'showEducation', widget: 'boolean', required: false }
- { label: 'showQr', name: 'showQr', widget: 'boolean', required: false }
- { label: 'favicon', name: 'favicon', widget: 'image' }
- label: 'Google'
name: 'google'
widget: 'object'
fields:
- { label: 'analytics', name: 'analytics', widget: 'object',fields: [{ label: 'Tracker ID', name: 'trackerID', widget: 'string' }] }

- { label: 'Show Git Commit INfo', name: 'enableGitInfo', widget: 'boolean', required: false }
- { label: 'outputs', name: 'outputs', widget: 'object', field:{name: 'home', label: 'home' , widget: list, default: ['HTML','JSON'] }}
- { label: 'taxonomies', name: 'taxonomies', widget: 'hidden', default:{name: 'home', label: 'home' , widget: string, default: ['tags'] }}

@@ -0,0 +1,13 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Content Manager</title>
</head>
<body>
<!-- Include the script that builds the page and powers Netlify CMS -->
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
<script type="module" src="/admin/cms.js"></script>
</body>
</html>
@@ -0,0 +1,97 @@


var AboutPreview = createClass({
// Object fields are simpler than lists - instead of `widgetsFor` returning
// an array of objects, it returns a single object. Accessing the shape of
// that object is the same as the shape of objects returned for list fields:
//
// {
// data: { front_limit: 0, author: 'Chris' },
// widgets: { front_limit: (<WidgetComponent>), author: (WidgetComponent>)}
// }
render: function() {
var entry = this.props.entry;
var intro = entry.getIn(['data', 'intro']);
var about = entry.getIn(['data', 'about']);
var classes = entry.getIn(['data', 'classes']);
var contact = entry.getIn(['data', 'contact']);
var bg = this.props.widgetsFor('intro').getIn(['widgets', 'background']).props.value;

return h('div',{},
// Intro Section
h('header', { "class":"masthead",
"style":{
backgroundImage: "url(" + bg + ")",
backgroundPosition: 'center',
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat'
}
},
h('div',{'class':'intro-body'},
h('div',{'class':'container'},
h('div',{'class':'row'},
h('div',{'class':'col-lg-8 mx-auto'},
h('div',{'class':'improve-contrast-box'},
h('h1',{'class':'brand-heading'},
this.props.widgetsFor('intro').getIn(['widgets', 'header'])
),
h('p',{'class':'intro-text'},
this.props.widgetsFor('intro').getIn(['widgets', 'text'])
)
)
)
)
)
)


) ,
// About Section
h('section',{"id":"about","class":"content-section text-center"},
h('div',{"class":"container"},
h('div',{"class":"row"},
h('div',{"class":"col-lg-8 mx-auto"},
h('h2',{},
this.props.widgetsFor('about').getIn(['widgets', 'header'])
),
h('p',{},
this.props.widgetsFor('about').getIn(['widgets', 'text'])
)
)
)
)
),
// Contact Section
h('section',{"id":"contact","class":"content-section text-center"},
h('div',{"class":"container"},
h('div',{"class":"row"},
h('div',{"class":"col-lg-8 mx-auto"},
h('h2',{},
this.props.widgetsFor('contact').getIn(['widgets', 'header'])
),
h('p',{},
this.props.widgetsFor('contact').getIn(['widgets', 'text'])
)
)
)
)
)

)



return h('div', {},
h('h1', {}, title),
h('dl', {},
h('dt', {}, 'Posts on Frontpage'),
h('dd', {}, this.props.widgetsFor('posts').getIn(['widgets', 'front_limit']) || 0),

h('dt', {}, 'Default Author'),
h('dd', {}, this.props.widgetsFor('posts').getIn(['data', 'author']) || 'None'),
)
);
}
});

export default AboutPreview;

0 comments on commit 5389c0f

Please sign in to comment.
You can’t perform that action at this time.