Code Monkey home page Code Monkey logo

dnndocs's Introduction

DNN Platform Documentation

The documentation site for the open source Content Management System DNN (formerly DotNetNuke).

The project uses the docfx library to pull XML comments from the DNN Platform source code and combine that with articles written in Markdown to form the documentation for DNN.

Installing Git

If you do not have Git installed, you will need to install it first. You can find instructions at Git's Installation Guide.

Setting Up the DNN Docs Project

The next step is to fork this repository from GitHub to your own GitHub repository in order to give you write access on your own copy (if you don't have a GitHub account, you can create a free one). Simply click the Fork button above to get started.

After your own fork is created, you need to copy the repository into your local machine, this is called cloning. This will create a copy of the DNNDocs Git repository (its directories and folders) on your local machine so that you can work with them there.

The following command will clone your forked repository to your working directory, so you may wish to cd to an appropriate directory first.

git clone https://github.com/your-github-user-name/DNNDocs.git

The previous command will have created a folder titled DNNDocs in your working directory. So, for example, if you had been working in C:\dev\, the previous command would have created C:\dev\DNNDocs\.

cd DNNDocs

The references from your local copy (clone) to their respective GitHub repositories are called remotes. By default the previous clone automatically setup a remote called origin to your fork on GitHub and you have read-write access to it (you can pull and push to it). In order to be able to pull the latest changes from other contributors on the official DNNDocs repository, you need to setup another remote to it, we call that remote upstream. In order to set it up, run the following command:

git remote add upstream https://github.com/DNNCommunity/DNNDocs

Unless you are part of the DNNDocs core team, you will only have read access (you can only pull) to this remote.

Running the DNN Docs Project Locally

.NET Framework Prerequisites

You should ensure that you already have .NET 5.0 (used by the build project) and the "Developer Pack" for .NET Framework 4.6.2 (used by the custom DocFx plugins) installed on your machine before trying the build process.

You should now be able to run the development version of the docs locally with the following command:

Windows Powershell:

.\build.ps1

Windows CommandLine:

build.cmd

Mac/Linux:

.\build.sh

The compilation process could take quite a while. You may see some warning messages. Eventually, you should see a message similar to:

Serving "C:\dev\DNNDocs\_site" on http://localhost:8080

You can now open http://localhost:8080 in your web browser to view your local DNNDocs app.

Contributing

You are now all setup to start your first contribution.

First, it is recommended to create a new branch to collect your changes without touching the main branch, this will make it easier later when you will need to pull the latest changes from the upstream remote (the official repository). You can use any branch name that makes sense to you as long as it does not have spaces or special characters other than - and _. Popular naming conventions are something that describes the issue solved or simply the issue number. To create a new branch you can type the following command:

git checkout -b your-branch-name

Next you can start editing documentation and saving files using your favorite text editor (Visual Studio Code, Atom, Sublime Text, Brackets Notedpad++, etc). When you are done with your changes you can verify the modified files. Some code editors will actually show a status of the modified files in their UI. If you want to verify it using the command line you can run the following command:

git status

In Git parlance, a logical set of changes is called a commit. All your current changes are just temporary until you actually commit to propose them, hence the name commit. To create a commit you first need to stage your changes, this is adding the files you want to commit into a list (staged changes). For simplicity, we are assuming that all the changes you saw in git status are to be included in the commit. To stage all changes, run the following command:

git add .

The . above means all changed files, if that is not the case you can replace the preceding command with either a globbing pattern or each filename you want to stage for the commit. If you want to verify what is staged or not staged, you can repeat the git status command.

Now that we have selected what goes into the commit, let's actually create our commit using the following command.

git commit -m "Here you can enter a commit message that summarizes the changes in this commit."

Congratulations, you have created your first commit! The next step is to push your local branch to the web, because right now this commit only exists in your computer. This step is called a push. Without parameters, the push command pushes commits to the default remote (in our case origin) into the same branch. The problem is that our branch is currently only local, so we need on the first push to specify the remote and the branch name. Again, most code editors have a UI to make this simpler, but in the command line, the command would be:

git push -u origin your-branch-name

Now your changes are available in your fork of the repository for anyone to view. Remember how you only have read access to the upstream (or offical repository)? Since we cannot push there, they need to pull. The next and last step is to propose your changes, or in other works, request from DNNDocs team to pull your changes, hence the name pull request. You can create a pull request directly in the browser, if you navigate the the origin or the upstream repositories any soon, you will see a banner showing the recent pushes and a button to create a pull request. If for some reason you do not see that banner, navigate to your fork and select your branch in the branches dropdown, you will see a "Create Pull Request" button.

Congratulations, you just created your first pull request!

Updating from upstream

A couple of days or weeks have passed and you are still all setup to continue contributing, but sice time has past, other awesome contributors have been working hard and now upstream, origin and your local clone may be out of sync with different content. Let's bring those back in sync. Remember how you can only read (pull) from the official repository (upstream remote) but you can read and write (pull and push) to your fork (origin remote). This means we will need to pull from upstream to your local clone and then push this back to your origin to get the 3 back in sync. But first we need to change our branch to the default (main) branch. Here is the series of commands to do what is explained in the paragraph:

git checkout main
git pull upstream main
git push

Everything is now updated per the latest changes everywhere, you are ready for your next contribution, scroll up and repeat from the "create a branch for your changes" step, rinse and repeat.

dnndocs's People

Contributors

ajwaka avatar aspelt avatar bdukes avatar birksy89 avatar cbpsc avatar david-poindexter avatar dnndev avatar donker avatar eptamminga avatar jeremy-farrance avatar mikesmeltzer avatar mitchelsellers avatar moorecreative avatar ohine avatar parasdaryanani avatar patrickryan79 avatar perezandres avatar quietly-turning avatar smallmistake avatar thabaum avatar timo-breumelhof avatar valadas avatar willstrohl 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

Watchers

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

dnndocs's Issues

Improve layout and styling of table of contents sidebar

General layout and style of the table of contents sidebar needs to be improved. Following are a few goals.

  • Widen container(s) to help prevent items from wrapping as much as possible
  • Remove plus/minus sign to allow extra width for items
  • Improve styling to behave more like a typical accordion

Link to Release Notes

Currently there is no direct link to the release notes other than search. This needs to be pulled out to be more visible and to be crawlable by search engines.

Clear "Invalid File Link" Warnings

When building, a very long list of warnings is generated similar to this:

[18-11-28 05:39:47.057]Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.ConceptualDocumentProcessor.Save](content/developers/included-modules/config-module-social-groups/090200/index.md#L42)Invalid file link:(~/content/developers/included-modules/config-module-social-groups/090200/img/scr-modulesettings-SocialGroups-AutoConfig.png).

RFC: Deployment Process

We need the following:

  • A build server
  • A temporary public-facing server to display results

I can run this with my Jenkins server and output it to an S3 site or my server as a static site. Thoughts?

Update CodePlex Links for DNN Archives

The archives have moved from CodePlex to GitHub. The links in the docs need to be changed to reflect the new location.

Example: content/administrators/release-notes/relnotes-2013-jan-09/index.md

RFC: Content Organization for DocFX

Currently the DocFX we're building is using the old file structure/organization which places content (articles) in index.md in the version folder (ie. 09.02.00) inside a topic folder (which may be inside another topic folder), inside a section folder like so:

dnn-docs/content/administrators/building-your-site/building-your-site/090200/index.md

Images are placed alongside the index.md file.

While this makes sense to prevent naming conflicts, DocFX effectively duplicates that tree structure in its table of contents (TOC), resulting in a deep tree structure that doesn't really add to the user experience.

We need to rethink the content organization and/or determine how to use DocFX's TOC mechanisms to provide quick and effective navigation via TOC while still preventing naming conflicts.

RFC: How to Avoid Shared Content Context Shift?

When linking to common content, the user is taken out of their "section" of the docs. This causes a context shift and confusion for the user.

For example, Developers who click on "Set Up DNN" are taken to the common setup information inside "Administrators". There is no way for them to get back to their previous page and they may not even be aware they are in a new section.

Use HTTPS URLs

As Clint was demoing his change to the Security page, I noticed that the link to the security center was using HTTP instead of HTTPS. Since the dnnsoftware.com site is served over HTTPS now, we should use HTTPS for those links. This would prevent attackers from being able to intercept links to security information. It's also just avoids an HTTPS redirect.

We can also update other URLs, since almost all of the sites the docs link to are on HTTPS now.

Update old URLs

In addition to the Codeplex URLs called out by #84, there are many other URLs that are pointed to old domains or pages.

For example, Bruce Chapman's site is offline, so we could use an archive.org URL to his blog posts. The DNN Forge has been taken down, so references to that could be removed. There are also some placeholder usages of google.com that can be removed.

Resolve broken links in each MD file

Open issue and instructions for reformatting the individual markdown pages that are related to the warnings about broken links when building.

There are two primary issues that need to be resolved for each markdown file.

  1. Images that currently exist in a sub-folder for a particular topic need to be moved to the main images folder in the root
  2. The toc at the top of the file needs to be removed and sub-headings need to be added instead which build the sidebar menu.

See DNNCommunity/dnn-docs@f8f7fa0

Administrators Section Markdown Formatting

Under the Administrator's section there are several files that need the markdown updated for a few items:

  • Callouts
  • Bolded words
  • Removing the 1 & 2 footnote 'artifacts' from the previous system

These issues are present because initially the goal was simply to convert all tables to markdown. After the table conversion started the updated syntax for callouts was created and shared. During this phase making words bold was not a priority.

Now I will go in and make these updates under the Administrators section (currently the largest section of the docs). The other sections do not need this treatment.

Install SSL on Site & Add CDN

In modern browsers, typing in the search box now shows a red "Not Secure" because the site is not using SSL. Rectify that.

Enable Lunr Search

Enable DocFX searching via Lunr. Later we can look at improving this with Algolia's DocSearch.

RFC: Merging Changes Across DNN Versions

The question is how do we handle a situation where the current version of the docs is for DNN 10. We've already released and have branches for DNN 8 and DNN 9. A change is made to a topic that applies to DNN 8-10. How do we handle getting that change in the DNN 8 branch merged into the DNN 9 and DNN 10 branches.

I think our best option is to use cherry picking. This a git command that allows us to take a specific commit in one branch and copy it into another branch. Its use is discouraged in development scenarios primarily because you are creating a copy of the changes in the commit and making a new commit on the new branch with those changes. In a development scenario, this isn't idea. because you lose the history of the original commit. However, this isn't a development scenario. We don't need to track changes to the content across time over all branches.

In order to do this, we should adopt a policy of 1 commit per file, unless the same change is made across multiple topics. Since cherry picking works with commits, the more granular we can make those commits, the easier it will be to get just the content we want. Plus, you can cherry pick multiple commits in one command.

How Cherry Picking Works

Let's say we have a master branch with the current DNN version (say, DNN10) and have a branch for DNN8 and DNN9. We'll call these branches: dnn10 dnn9 dnn8 and master (which contains the current release of the docs, regardless of DNN version). Let's also assume that changes were made to a topic in the dnn8 branch that should also apply to dnn9 and dnn10.

Step One: Get the Hash of the Source Commit

The first thing we need to do is identify the specific commit(s) we want to merge.

git checkout dnn8
git log --oneline
5dfe882 Changed File Title to Creating Users
12dc37f Added Creating Portal topic

For this example, we'll use 5dfe882

Step Two: Switch to the Target Branch

git checkout dnn9

Step Three: Do the Cherry Pick

git cherry-pick 5dfe882

You can pull in multiple commits by simply adding them to the command:

git cherry-pick 5dfe992 12dc37f

Step Four: Push your Changes

git push

Duplicate Content in Admin Micro-Services

In the Administrators section we have some duplicate content and I believe it may be this way across all "personas" index pages in the docs project.

Administrators > Microservices > About Micro-Services

has the same content as

Administrators > MicroServices > Administrators-Microservices-Overview

Correct temp nav links

Currently, the navigation links for Administrators | Designers | Developers have the wrong URLs based on an older folder structure.

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.