Dark Knight (5e Optimized Character Build)
From D&D Wiki
This build is focused on creating a very powerful melee combatant that is able to tilt the odds in his or her favor with minimal, yet judicious use of magic, all while adhering to core rules for its mechanics. Oh, and having a fighter make a pledge to a 'sinister' entity part-way to the campaign can give a lot of good opportunities for RP.
While some aspects of this build could be managed with the Eldritch Knight, the addition of Warlock levels adds perhaps the most potent combo a melee fighter could possess: Devil Sight and self-casted Darkness. By casting Darkness on your weapon you gain a mobile disadvantage field that you are immune to, giving you a significant boost to survivability and success as a singular fighter.
This build came about due to the small nature of my DnD group, and the fact that I was going to be the only frontline fighter type of character -- my party members consist of a Sorcerer/Bard and a Rogue who values the 'better part of valor' as it were. As such it was my job to create a wall to stem the tide of baddies coming at my squishier friends, who can never be made to go without gear... hence... the Dark Knight.
...Creating your DK...
Key stats of this build are DEX, CHA and CON, and I'd recommend trying to get to a minimum of 16 DEX/CHA and 14 CON between your stat allocation and racial choices. Depending on how your DM is letting you decide your stats will determine how easy this is -- luckily for me my DM made us roll for it and I personally rolled quite well, able to take standard human to achieve this while bolstering my off-stats. Elves, Half-Elves, Tieflings, Halflings and Human Variants will all work for the build if you need to fiddle to get the minimums.
I use DEX as my main attack stat because I'm going to be using a finesse weapon for the Defensive Duelist feat and it gives me access to a ranged physical weapon in a pinch -- also it will give us free armor, and that is always a good thing. CON is great for all fighters, but for DK's it is especially useful since Darkness is a concentration spell, so you might want to pump this a little more than you might in a different build. CHA is the spellcasting attribute for Warlocks, and while we won't be dipping too far down that line, it will certainly give us a useful boost in and out of combat.
I personally use the homebrew weapon 'Shamshir' as my main weapon, but there is no reason you couldn't use a Rapier to keep it entirely kosher with the published rulebooks -- I just like the aesthetics of a sabre/shamshir.
Level 1: Fighter
Start as a fighter for the higher base health and the profiencies. Using Barbarian won't work, because you cannot maintain a concentration spell while raging, meaning you pretty much waste a level spot if you take it here. Fighting styles are flexible, but in my case, since I was the only frontliner, I took Defensive for the bonus AC -- I strongly recommend only deviating from this if you have other characters standing with you in melee (between chainmail armor, a shield and this feat, you will be starting with 19AC!) If you took Human Variant as your race, pick either Alert or Defensive Duelist as your feat.
Level 2-6: Fighter
Keep leveling as a fighter to bolster your HP and gain access to Action Surge, 2 Feats, an additional attack action, and the Battlemaster Archetype. I prefer Battlemaster over Champion or Eldritch Knight for the huge versatility of the Combat Maneuvers; not to mention that they are basically on-demand crits! Choose the Maneuvers that are fitting for your campaign (personally I chose Maneuvering Strike to allow my squishy friends to get out of melee, Parry to enhance my survivability and Goading Attack to again give my friends more survivability). If you are more offensive minded you might take Trip Attack, Sweeping Attack and Evasive Footwork (or Riposte!). Do not take Disarming Strike! For the two feats, Alert and Defensive Duelist are both amazing feats that will help you in the early game, though personally I took Sentinel instead of Alert to keep hostiles away from my buddies. If you are a Human Variant (or don't have an issue with a lower initiative roll) take Sentinel for a defensive oriented character, and Savage Attacker or Charger for an offensive one.
Level 7-11: Warlock
Choose the Fiend patron so that every time you kill something, you gain a buffer of temporary hitpoints. This might not seem like much, but when combined with the AC and imposed disadvantage of Darkness, it will let you get away with some pretty wild plans. The Cantrips I chose were Eldritch Blast (so that I always have a ranged option, even if it does have a somatic component that would force me to sheath), and Prestidigitation for out of combat versatility. I also chose Comprehend Languages for RP purposes, and Command as a powerful combat spell (this is why you shouldn't take disarming strike as a Combat Maneuver!). Command is a verbal only spell so you don't need to sheath to use it in combat.
Next choose Devil Sight and Armor of Shadows as your invocations. Devil Sight is needed for later (or possibly now, if you have a caster willing to use their copy of Darkness on your sword) and Armor of Shadows will allow you to have mage armor as a cantrip -- and depending on your DEX score and situation in the campaign, it may even be better than the armor you are wearing! I chose the spell 'Burning Hands' to have access to an AoE damage spell, though again this is a spell I would need to sheath for. If this is an issue for you, you can take the 'War Caster' feat earlier, or at Level 10.
Next we gain the Pact of the Blade feature to never again be forced to be unarmed, as well as the second half of our main combo: Darkness. Darkness is a verbal only spell, so again you do not need to sheath. It is able to be cast on an area OR on an object you are holding OR on an object not currently being worn or carried by a third party. This gives you some flexibility in how you want to apply it, but at the end of the day you will still have a significant advantage against other melee opponents and even casters to an extent. Yes, casters without a way of seeing through the magical darkness (or dispelling it) won't be able to discriminate or aim within your zone of influence -- so they may hit their friends with AoE spells if they try to cast inside. Of course this also can happen from your friends... so watch out for the occasional 'friendly' fireball. To get around this, you can take "Shield Master' like I did at level 10 to occasionally let you take no damage from such uh... enthusiastic casting.
Speaking of Level 11, I took Misty Step as my spell option so that I could blink out of danger if things went south. I personally took True Strike as my bonus cantrip but I'm only luke warm about it.
The Rest of the Build
That is the core build. I took a fifth level in Bladelock for another spell (I took Gaseous Form for RP purposes) and another invocation. The third invocation is totally up to you for flavor purposes -- I took Repelling Blast for another tool to allow my squishies to move around in combat if I can't safely get over to them to use Maneuvering Strike, but options like Mire the Mind (lets you cast slow) or Mask of Many Faces (Cast Disguise Self as a cantrip!) are also strong picks.
After that, just finish out the character/campaign with Fighter levels and your favorite feats (or shore up whatever stats you might need). As a Variant, you can fold in 3 levels of Ranger (if your DM allows triple classing) to gain access to Hunter's Mark, another fighting style, Favored Enemy/Terrain and the Hunter's Archetype. Depending on your campaign, choose either Colossus Slayer (big single target damage) or Horde Breaker (destroy ALL the trash mobs!). If you want to use ranger early on, put it the 3 levels after warlock, which is at level 12-14, but keep in mind this will delay you getting a third attack action from Fighter! Depending on how many opponents your DM throws at you, this can be mitigated with Hordebreaker + Sweeping Attack, so keep that in mind!
Anyways, hope this gave you something to think about and I hope you enjoy my take of a Dark Knight or 'Cursed Warrior' trope.