Giter Club home page Giter Club logo

tanzu-dev-portal's Introduction

VMwareNetlify Status

About The Project

Tanzu Developer Center Screen Shot

The Tanzu Developer Center is a site specifically built to be a great resource for software development teams. The contributions on the Tanzu Developer Center are from teams across VMware, as well as individuals without.

Our guiding principle is to ensure readers have free, immediate access to all the content on the Tanzu Developer Center. No purchase is ever necessary to access content on the Tanzu Developer Center because it is either open source or an easily accessible trial.

Getting Started Building a Local Deployment of the Tanzu Developer Center

Clone this repository

    git clone --recurse-submodules https://github.com/vmware-tanzu/tanzu-dev-portal.git

These options help speed up the repo setup by initializing submodules during the clone process.

There are two available options for building and running a local preview of the Tanzu Developer Center:

  1. Using the dev container
  2. Setup a local build environment

Option 1: Using The Dev Container

The Dev Container is offered to simplify a local environment setup for those working with and contributing to the Tanzu Developer Center.

This method requires the following software be installed:

  • GNU make (Note: make should be available on a Mac with Xcode dev tools installed. Linux users can use their distribution's application manager (e.g. apt install make) or follow the manual steps specified by make. Windows requires special installation to use make.)
  • Docker (Testing was done with docker desktop installed via brew install --cask docker)

An alternative option if make is unavailable is to utilize docker cli commands to setup the dev-container and work with make from there.

Building the Dev Container Image and Container

(Note: The docker daemon must be running):

make dev-container

This will connect to a bash shell in the container immediately after it has finished the build process.

The default working directory in the shell will be the Tanzu Developer Center git repo directory (it is mounted as a volume in the container). All file edits/additions made from within the container are persistent and saved on the host system.

The container is configured to replicate a fully functional local developer setup. From within the Dev Container shell prompt, run make help to see a list of available actions.

Interacting With Dev Container

The Makefile includes several actions to interact with the dev container. All of the commands are in the following format:

make dev-container.<action>

Use make help to see the full list of actions

Some examples:

make dev-container.pr-test # Simulates all github pull request checks using the container in docker and act
make dev-container.shell # Starts the container and connects to a bash shell

From the container shell, a preview of the site can be built using:

make preview

Option 2: Setup A Local Build Environment

These are the software prerequisites needed to build a local preview of the Tanzu Developer Center site.

Software Installation Prerequisites

Note: These instructions were designed for Mac users. Linux and Windows users without access to make and brew will need to manually install the prerequisites.

  • Install Hugo — The Tanzu Developer Center uses Hugo to build the site from Markdown files. You'll need to get Hugo if you want to build and run the site locally. Make sure you install the extended version with support for SCSS/SASS. This site pins hugo to a specific version (currently 0.107.0) to build so if you're using a different version, your experience may vary. To install hugo, follow the instructions for your specific environment as detailed in the hugo documentation. Ultimately, you have two main options:

    • Download the correct extended binary for your OS from gohugo GitHub releases page for 0.107.0 and then move the hugo binary to an appropriate location (ie. sudo cp hugo /usr/local/bin) and/or add it to your PATH.
    • Use brew install hugo and brew pin hugo to pin it to the correct version (0.107.0). (MacOS only.)
  • Install Node (and NPM) — Certain features of the site require Node in order to build (PostCSS, Autoprefixer, etc.), and the Node Package Manager (npm) is also used to manage local packages. If you don’t already have Node installed, you’ll need it in order to build the site. Though it may work with different versions, you should use the same ones that Netlify does, which are Node 16 (as defined in the .nvmrc file at the root) and npm 8 (the corresponding version that comes with Node 16). You may download and install Node or use brew to install it:

    brew install node@16

Note: The reason the .nvmrc is required even though the default should already be v16 for default image that Netlify is set to use - Ubuntu Focal 20.04 - when the site repository was originally linked Netlify, it was using an older image that defaulted to v12, so it must be specified explicitly in the .nvmrc file. (See this article for more details.

  • Install act — The Tanzu Developer Center uses GitHub Actions to perform automated testing periodically, and on pull requests. If you plan to run these tests locally, you will need act. Follow these instructions to install act, or use brew:

    brew install act
  • Install Docker — The act tool depends upon Docker to build images for local automated tests. You can download Docker Desktop or use brew:

    brew install docker --cask

    Note: Mac OS X requires Docker Desktop 2.4 or later

With all the dependencies installed, use make help to see the available actions.

Troubleshooting

Q. I'm receiving an error about cloning themes/docsy

With the change with how the theme files are overridden, the first time you update your branch you may see the following issue when running make preview:

git submodule update --init --recursive
Submodule 'themes/docsy' (https://github.com/google/docsy.git) registered for path 'themes/docsy'
fatal: not a git repository: /private/tmp/tanzu-dev-portal/themes/docsy/../../.git/modules/themes/docsy
Failed to clone 'themes/docsy'. Retry scheduled
BUG: submodule considered for cloning, doesn't need cloning any more?
fatal: could not get a repository handle for submodule 'themes/docsy'
make: *** [theme] Error 1

You can run the following command for a one-time fix:

make clean-submodule

Q. make preview is throwing a fatal error: pipe failed error

This is due to the number of files that are opened during the process of building the site. If you're on OSX, this can be addressed with the following command:

sudo launchctl limit maxfiles 65535 200000
ulimit -n 65535
sudo sysctl -w kern.maxfiles=100000
sudo sysctl -w kern.maxfilesperproc=65535

Q. I am on Windows and make preview doesn't work

On Windows, you may need to use hugo server -D to start the application. The site will then be available on http://localhost:1313/

Open Projects, Issues, and Content Backlog

See the open issues and project boards for a list of proposed features, content backlog, and known issues.

Contributing

Content contributions are what make open source and the developer community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

Contributing Code

The code contribution process is documented in CONTRIBUTING.md.

Contributing Content

The content contribution process is documented fully on our GitHub wiki site and includes methods for both VMware employees as well as non-employees to contribute to content or bug fixes.

Code of Conduct

We, the Admin team of the Tanzu Developer Center adhere to a code of conduct available here: CODE_OF_CONDUCT.md.

Tanzu Developer Center Open Source License

The Tanzu Developer Center is distributed under the Apache License. For more information, see LICENSE.

tanzu-dev-portal's People

Contributors

actions-user avatar andrebrowne avatar anthonyvetter avatar benwilcock avatar billkable avatar brianmmcclain avatar bryanfriedman avatar craigtracey avatar danielramirez0 avatar danvega avatar dashaun avatar dependabot[bot] avatar everythingeverywhere avatar jacksoncvm avatar jesse-martinez avatar joemoore avatar johnharris85 avatar jomartin-999 avatar joshlong avatar layla-p avatar maarc avatar mario5gray avatar ntschutta avatar paulczar avatar rctay avatar stealthybox avatar tiffanyfay avatar tybritten avatar wiggitywhitney avatar zmb3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tanzu-dev-portal's Issues

Easy way to copy commands/code sample text blocks

What do we think about having a "Copy" button for command/code samples? I'd say at this point it might need to be an annotation we add to the markdown since command samples are formatted differently, but thinking forward, it could be a handy feature.

Tags Taxonomy Navigation

Navigation works pretty well with Patterns and Topics. Do we want to look at the Tags taxonomy?

Can't resize images

can see in this pr: #21

If I physically resize the image, they still display the same size. I'm just using the normal ![](/path/to/image.png)

Videos filter

Add filter to top-level videos page similar to Samples

Fix some weird sorting things

Guides sorting is funky because I was trying to sort both by weight and by the prefix so that we can do things like "Tech: What Is?" first then "Tech: Getting Started" next, but the "Tech" pieces would be alphabetized. That's what sortTitle was for, but it's confusing, and also doesn't solve all cases. I think we should:

  • Rename sortTitle to titlePrefix or something more clear about how guides are sorted
  • Change the box-index pages to sort by title (or weight in the case of topics) instead of sortTitle` - they end up sorting randomly otherwise
  • Figure out if there's a way to maybe pin guides to the front (so we can do things like make "What Is CI/CD?" the first in the list under CI/CD instead of "ArgoCD")

Cleanup the custom_dict.txt file

Alphabetize or organize the list better.

Also, are there better options for handling/ignoring things like YouTube GUIDs and git hashes?

Image Captions

We should have a style for image captions and alt text for a11y

Guides section list view

Just a question...do we want the guides list to allow for navigating across sections beyond the breadcrumb? Top level guides page having the box-index works fine, but I wonder about at the section level (like guides/containers) if we want to have a collapsed sidebar list for easy cross navigation.

Video playback

Videos play in thumbnails...do we want the option to click on title and show a full single page with embedded video?

Update Navigation

  • Add dropdown menu styling to navigation
  • Consolidate groups into dropdowns
  • Add Patterns and Topics
  • Add Tanzu TV/Tanzu Tuesdays

Solve the /developer problems without hardcoding

Current configuration with nginx proxy does not solve for:

  • sitemap.xml
  • robots.txt
  • RSS
  • og tags
  • css (light theme, hero images)

We think the "right" way is to use the baseUrl configuration option within Hugo to build the site at /developer and then update nginx proxy to just do hostname translation instead of path rewriting. We'd also then want to undo the hardcoded templating we added.

Need to try this and test it. Along with this I think we should set up an easily testable environment for building nginx and testing the proxy in the future.

Add Authors for the rest of the site (not just blogs)

Up for discussion.
Many of the other sites we looked at didn't have authors on guides, etc but most were product-focused (or in the case of OSS projects, handled by contributors). I think it's worth looking at adding authors for all the content. It will encourage more contributors by giving them recognition for their work, plus it will make the site less impersonal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.